Let's say there is a mobile application that needs to make a sync request/query for some data from a server. The request will come to hosted JMS client first, that will publish a message/request on external Queue (from partner). Now here where it start to be unclear. How do I get a response back from the partner in the synchronous fashion.
Thanks
The textbook pattern is as follows:
Note that with WMQ the expected behavior from the service provider is to copy the JMSMessageID from the request message to the JMSCorrelationID of the response. It is less common to require the sender to generate a JMSCorrelation ID and copy it to the JMSCorrelationID of the response but some applications use that behavior. You will need to understand how your service provider deals with this to determine the correct behavior for your requester application.
If you are using the complete WMQ Client install you will already have sample code that does most of this. If installed to the default location, look in...
C:\Program Files\IBM\Websphere MQ\tools\jms\samples\simple\simpleRequestor.java
...or the equivalent location under /var/mqm
for UNIX/Linux distributions. This is one of the many reasons to install the full client rather than simply grabbing the jar files. If you need to download the client is is delivered as SupportPac MQC7.