[rabbitmq-discuss] Messages left in queue

Matthias Radestock matthias at lshift.net
Mon Oct 26 22:17:22 GMT 2009


Allen,

Allen Jones wrote:
> I am ensuring I ACK any messages I receive and most of the time 
> (hundreds of thousands of messages) things are fine. But occasionally 
> there are messages stuck.

How are you observing the "stuckness"?

Check the output of 'rabbitmqctl list_queues name consumers 
messages_ready messages_unacknowledged'.

'consumers' is the current consumer count for that queue.

The 'messages_ready' figure should be zero unless you have no consumers 
or there is a backlog due to some form of flow control taking place 
(e.g. basic.qos or TCP-level).

The 'messages_unacknowledged' figure tells you how many messages sent to 
consumer are awaiting an acknowledgement.

> It tends to be more in my dev environment than in production, so it 
> could be to do with tearing processes down in an unfriendly way.

Closing the channel/model or connection - either via the API or 
"forcefully", e.g. by closing the socket or killing the client 
application - will requeue the unacknowledged messages. So that 
shouldn't result in stuckness.

> I just wanted to check if there are any known circumstances where
> messages might get stuck in 1.6?

There is no known problem in that area, though please upgrade to 1.7 if 
you can.


Regards,

Matthias.




More information about the rabbitmq-discuss mailing list