With a thread that waits on a latch? and when onMessage is completed, call latch.countDown()?
Or periodically poll for available messages? On Sun, Jul 21, 2013 at 7:04 AM, indikaM <[email protected]> wrote: > Hi all,I am trying to create request / response queue with ActiveMQ. What I > have done is created a temp Queue and setting the correlationId to the > message I send the request to my ActiveMQ server where consumers will > consume the message, do work and send back the response to the temp queue. > Everythig is working fine as I had expected except once I receive the > message back to the requesting producer, my JMSListsner hangs. I want to > know is there is anyway that I can stop or dispose the listener. I tried > stopping the producer / session and even the connection, but they do not > seem to work.The purpose of this request / response queue is to create a > kind of a broker which can be used to receive request from a client and > send > them to a back end (running in a JEE server) where workers will do some > business logic and the response of that to be sent back to the client.If > anyone has an idea or can point me in getting a way to stop the listener > from continuing after receiving the response from the server, it will be > great help. > > > > -- > View this message in context: > http://activemq.2283324.n4.nabble.com/JMSMessageListener-hangs-with-Request-Response-tp4669551.html > Sent from the ActiveMQ - Dev mailing list archive at Nabble.com. -- *Christian Posta* http://www.christianposta.com/blog twitter: @christianposta
