[prev in list] [next in list] [prev in thread] [next in thread] 

List:       activemq-users
Subject:    Re: To pick pending messages, consumer should just
From:       Gary Tully <gary.tully () gmail ! com>
Date:       2011-08-31 15:00:16
Message-ID: CAH+vQmOzvg0h7sQA589noAx5RMD-yndkY6AbRb80A1b8+UO-=g () mail ! gmail ! com
[Download RAW message or body]

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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic