We have an existing Websphere MQ Queue Manager (running fine, no issues). This has for each "method" a pair of queues: Request and Response.
We'd like to put a web service front end over this for the benefit of some apps we have that cannot call MQ but can call web services.
Of course, Web Services can be synchronous but our MQ is async...and I am not sure how to get around this.
Example: App calls webservice...web service waits for response. Webservice calls MQ Request queue and puts the message.
of course, the response will be on a different channel...so my thinking is that the webservice would have to read all the messages on the queue and only remove the correct one (by some identifier such as GUID).
Has anyone got any previous design knowledge on solving this?
The web service does need to read all the response messages, you can perform a correlate get. When the request is put on the request queue you use the request message id and wait on the response queue for the response message with the correlation id. MQ handles this very efficiently.
Here is another stackoverflow answer that shows some code for performing a correlated get Issue in Correlating request message to resp message in Java Client to access MQ Series