activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Tully <gary.tu...@gmail.com>
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 <agarwal.manu@gmail.com> 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: http://activemq.2283324.n4.nabble.com/To-pick-pending-messages-consumer-should-just-unsubscribe-subscribe-or-completely-disconnect-connectr-tp3778860p3778860.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>



-- 
http://fusesource.com
http://blog.garytully.com

Mime
View raw message