[rabbitmq-discuss] what would cause queue size to immediately go to 0?
majek04 at gmail.com
Fri Nov 5 13:33:38 GMT 2010
On Fri, Nov 5, 2010 at 13:25, Shane <shane at digitalsanctum.com> wrote:
> I have a fanout exchange with one consumer and I'm seeing the queue
> size go from over 60 to 0 as soon as the first message is consumed.
> After that I'm seeing logging indicating the messages are continuing
> to get consumed at the expected rate (one every ~30s). I'm observing
> the queue size by looking at the "Queues" page of the mgmt plugin as
> well as running rabbitmqctl list_queues. I've tested this with all the
> 2.x versions and erlange 5.7.5 and 126.96.36.199 on windows xp.
> Anyone see this behavior before?
You probably use `no_ack=True` flag for `basic.consume`.
With acknowledgments turned off (noack=True), all the messages
from the queue get delivered immediately to your consumer.
It doesn't really matter how fast is your consumer - Rabbit
believes that all the messages were delivered, while, in fact
they are buffered somewhere on the network.
Please try using explicit acknowledgments, with no_ack=False
and do acks manually using `basic_ack`
More information about the rabbitmq-discuss