Jms Request/Reply question
Hi All,
I am doing a JMS request/reply pattern as specified in Professional JMS.
I get the whole thing of setting up temporary queues for the initial requestor to read a response from the responder.
What I want to know, is whether it is possible to use a single queue for the request and response without the 2 subscribers on the queue hijacking each other's messages.
For example:
- client A sends message to Q.requestReply queue with text ("the request")
- B reads message off Q.requestReply queue
- B captures MessageId
- B sets the replyMessage CorrelationId = MessageId
- B sends replyMessage to Q.requestReply queue with text ("the response")
- A reads the reply message and prints "the response"
Is this possible without B picking up the message that it replied to A?
I am trying this through java, and if A is down, B keep on reading the message that it posted to the Q as a response to A.
Hope this makes sense
Regards
Ruan
|