Hi, there's usually a listener (on app level) that receives all requests and then dispatch them further in the app based on correlation id (http://activemq.apache.org/how-should-i-implement-request-response-with-jms.html)
The other approach would be to use selectors to consume from the "reply queue" Cheers -- Dejan Bosanac - http://twitter.com/dejanb Open Source Integration - http://fusesource.com/ ActiveMQ in Action - http://www.manning.com/snyder/ Blog - http://www.nighttale.net On Sun, Oct 10, 2010 at 8:31 AM, BenXS <bxsto...@yahoo.co.uk> wrote: > > When a MDB (message driven bean) instance number 6789 sends (asynchronously) > a JMS Request > to a message broker it expects later a JMS response. > > Assume now this JMS response is put into the queue by a server. > > How can I ensure that MDB instance 6789 gets the response which is intended > for him and not the > other instance 2345 (who is listening at the same queue)? > > This is normally done by passing a JMS correlation ID in JMS header. > > But who is how responsible to direct the JMS response to the corresponding > initiator/requestor? > > Is this done (automatically) in MessageBroker or does the Java MDB has to > keep track? > -- > View this message in context: > http://activemq.2283324.n4.nabble.com/How-does-JMS-correlation-work-in-Java-tp2970065p2970065.html > Sent from the ActiveMQ - User mailing list archive at Nabble.com. >