activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Tully <>
Subject Re: To pick pending messages, consumer should just unsubscribe/subscribe or completely disconnect/connect from broker
Date Wed, 31 Aug 2011 15:00:16 GMT
There is no correct way, both are correct. Calling close()  to
unsubscribe and session.addConsumer() to subscribe again is the most
efficient... but if you can detect the hang and again return from your
listener or call receive() again that will also suffice.

When you say hang, what component blocks and why?

On 30 August 2011 15:30, manua <> wrote:
> HI,
> I have activemq setup with a consumer on a queue.
> If the consumer hangs, there are pending messages in the queue.
> To consume those messages, I restart the consumer.
> To restart should I just unsubscribe/subscribe to the queue or should I
> completely disconnect from the broker and reconnect.
> What is the correct way to do this.
> Thanks
> Manu
> --
> View this message in context:
> Sent from the ActiveMQ - User mailing list archive at


View raw message