[rabbitmq-discuss] high number of unack'ed messages when queue grows large
Matthew Sackman
matthew at lshift.net
Fri May 7 14:49:21 BST 2010
Hi Mario,
On Fri, May 07, 2010 at 02:43:42PM +0100, mmenti at gmail.com wrote:
> We've been seeing an issue where the number of unack'ed messages suddenly
> starts growing much larger than the number of connected consumers, whenever
> the queue gets to a certain size (somewhere around 50k messages in the
> queue, with 250 consumers connected). We've noticed that by reducing the
> number of consumers, the issue becomes less pronounced, but was wondering if
> anyone else is seeing this, and if there's any ways to avoid this? We're
> using rabbitmq 1.7.0 on an 64-bit Amazon EC2 Ubuntu 8.04 hardy AMI.
There are two parts to this issue. Firstly, some priorities of messages
internally were changed either in 1.7.1 or 1.7.2 so that acks would have
higher priority internally than publishes. This helps solve this
problem, and so I would recommend you upgrade.
Secondly, you can help by setting a qos prefetch count on your consumers
- if, say, you set it to 10, then you're ensuring that each consumer
will only receive 10 messages before it must a) ack a message and b)
that ack is received *and*processed* by Rabbit. This will ensure the
unacked message count stays low.
Matthew
More information about the rabbitmq-discuss
mailing list