On Fri, May 7, 2010 at 2:49 PM, Matthew Sackman <span dir="ltr"><<a href="mailto:matthew@lshift.net">matthew@lshift.net</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi Mario,<br>
<div class="im"><br>
On Fri, May 07, 2010 at 02:43:42PM +0100, <a href="mailto:mmenti@gmail.com">mmenti@gmail.com</a> wrote:<br>
> We've been seeing an issue where the number of unack'ed messages suddenly<br>
> starts growing much larger than the number of connected consumers, whenever<br>
> the queue gets to a certain size (somewhere around 50k messages in the<br>
> queue, with 250 consumers connected). We've noticed that by reducing the<br>
> number of consumers, the issue becomes less pronounced, but was wondering if<br>
> anyone else is seeing this, and if there's any ways to avoid this? We're<br>
> using rabbitmq 1.7.0 on an 64-bit Amazon EC2 Ubuntu 8.04 hardy AMI.<br>
<br>
</div>There are two parts to this issue. Firstly, some priorities of messages<br>
internally were changed either in 1.7.1 or 1.7.2 so that acks would have<br>
higher priority internally than publishes. This helps solve this<br>
problem, and so I would recommend you upgrade.<br></blockquote><div><br></div><div>Thanks, good to know - we'll try and do that as soon as is feasible.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
Secondly, you can help by setting a qos prefetch count on your consumers<br>
- if, say, you set it to 10, then you're ensuring that each consumer<br>
will only receive 10 messages before it must a) ack a message and b)<br>
that ack is received *and*processed* by Rabbit. This will ensure the<br>
unacked message count stays low.<br></blockquote><div><br></div><div><br></div><div>Strangely we already have prefetch set to 1 on the consumers, and still see this issue.</div><div> </div></div>