Today, i want to share about jPOS Client Asynchronous Request. When we look at MUX interface there are two overloading request(ISOMsg, timeout) and request(ISOMsg, timeout, ISORequestListener, handback) method for synchronous and asynchronous messaging.
usually, i’am using request(ISOMsg, timeout) method for sending request to server. But when i look at MUX source for fun, i realize that there are asynchronous way to send request. So in this post i will share about jPOS Client Asynchronous Request.
You can see the different with my old post about jPOS Client Receive Response to Specific Port. in this post about jPOS Client Asynchronous Request receive response with same port when we are sending request, even both of my post can be used for asynchronous request methods.
So, why we need this asynchronous request?? to answere these question, look at image below:
Now, are you getting my point? yes, we can parallel the process! we don’t need to waste 200 ms for waiting the response. because waiting is always boring! 😀
See the QBean bellow to sending request asynchronously.