[rabbitmq-discuss] 2 unack messages for 1 process

Ask Solem ask at rabbitmq.com
Mon Mar 26 15:09:28 BST 2012


On 21 Mar 2012, at 16:26, Paulo Cheque wrote:

> Hi, I am using Celery (http://celeryproject.org/) to produce and
> consume RabbitMQ messages. Only one process of Celery consume
> messages, so why can I see in Rabbit 2 unack messages at the same
> time?
> 
> I understand Rabbit had 1 unack message for each consumer process.
> 

See http://docs.celeryproject.org/en/latest/userguide/optimizing.html#prefetch-limits

Also, Celery has two 'ack' settings: early or late.
With early ack (default) the message is acknowledged *before* the
task is executed, with late ack it is acknowledged after.

So with early ack it may reserve an additional message even if the prefetch multiplier
is set to 1.


You should read this FAQ entry to understand why Celery uses the early ack behavior
by default: http://docs.celeryproject.org/en/latest/faq.html#should-i-use-retry-or-acks-late



More information about the rabbitmq-discuss mailing list