You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by David Kendall <dk...@kodakgallery.com> on 2007/02/21 23:17:23 UTC

Messages Stuck in Queue after Failover

I am testing failover scenarios with ActiveMq 4.1 and with Shared File System
Master Slave. The failover seems to work fine - but I notice that some
messages remain "stuck" in the queue after the failover and don't get
consumed. If I restart the consumer application after the failover happens
then these messages get consumed correctly. This seems to happen with both
AUTO_ACKNOWLEDGE and CLIENT_ACKNOWLEGE.

I assume that the stuck messages had likely been fetched and buffered by a
consumer before the failure of the master - but had not yet been
acknowledged by the application. Somehow the broker has them flagged as in
flight. This seems confirmed by the fact that when I reduce the prefetch
limit the number of stuck messages is reduced. But it seems counter
productive to incur the overhead of a low prefetch limit just so that we can
guard against this corner case.

Is there a way to tell the broker that messages sent to a consumer will
never be consumed - and so to resend them to a current consumer. I see
various questions around stuck messages in the forums here - but little in
the way of resolution.

Thanks in advance for any assistance.

Dave Kendall
Principal Software Engineer
Kodak Gallery

-- 
View this message in context: http://www.nabble.com/Messages-Stuck-in-Queue-after-Failover-tf3269653s2354.html#a9090364
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Messages Stuck in Queue after Failover

Posted by James Strachan <ja...@gmail.com>.
I wonder if you could try reproducing this issue on the latest 4.1
branch - as we will release 4.1.1 soon with some fixes in this area

On 2/21/07, David Kendall <dk...@kodakgallery.com> wrote:
>
> I am testing failover scenarios with ActiveMq 4.1 and with Shared File
> System
> Master Slave. The failover seems to work fine - but I notice that some
> messages remain "stuck" in the queue after the failover and don't get
> consumed. If I restart the consumer application after the failover happens
> then these messages get consumed correctly. This seems to happen with both
> AUTO_ACKNOWLEDGE and CLIENT_ACKNOWLEGE.
>
> I assume that the stuck messages had likely been fetched and buffered by a
> consumer before the failure of the master - but had not yet been
> acknowledged by the application. Somehow the broker has them flagged as in
> flight. This seems confirmed by the fact that when I reduce the prefetch
> limit the number of stuck messages is reduced. But it seems counter
> productive to incur the overhead of a low prefetch limit just so that we can
> guard against this corner case.
>
> Is there a way to tell the broker that messages sent to a consumer will
> never be consumed - and so to resend them to a current consumer. I see
> various questions around stuck messages in the forums here - but little in
> the way of resolution.
>
> Thanks in advance for any assistance.
>
> Dave Kendall
> Principal Software Engineer
> Kodak Gallery
>
> --
> View this message in context:
> http://www.nabble.com/Messages-Stuck-in-Queue-after-Failover-tf3269653s2354.html#a9090364
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>


-- 

James
-------
http://radio.weblogs.com/0112098/