What is the practical use of JMSCorrelationId
1 posts in topic
Flat View  Flat View

Posted By:   sabu_vs
Posted On:   Monday, September 15, 2003 08:10 PM

What is the practical use of JMSCorrelationId.Could you give me a usgae example



Re: What is the practical use of JMSCorrelationId

Posted By:   Nicholas_Whitehead  
Posted On:   Wednesday, September 17, 2003 06:17 AM


The correlation ID can be used to tie together two otherwise uncorrelated messages. For example, you may have a client app that publishes requests on a JMS queue, but does not wait for a response on a temporary queue (queue requestor style). Instead, responses to requests are handled by a seperate thread that receives request response messages from another queue. So you would match up a response message to the request issued by the correlation id. The request handling process would insert the JMS Message ID of the request into the correlation ID of the response message.

That was a bit of a mouthful, but I would add that the field itself does not really do anything special that you could not do yourself with custom message properties, but a space has been reserved for it in the spec.


About | Sitemap | Contact