[rabbitmq-discuss] Ack semantics in RabbitMQ
Matthias Radestock
matthias at lshift.net
Fri Mar 13 12:24:49 GMT 2009
Eran,
Eran Sandler wrote:
> In a consumer pull model, where consumers pull the queue once in a while
> (without subscription) and you have multiple consumer, if a consumer
> pulls a message (without auto ack) and doesn't ack it can another
> consumer still get it or is it marked in a certain way until its acked
> and deleted?
The AMQP ack model for subscriptions and "pull" are identical. In both
cases the message is kept on the server but is unavailable to other
consumers until it either has been ack'ed (and gets removed), nack'ed
(with basic.reject; though RabbitMQ does not implement that) or the
channel/connection is closed (at which point the message becomes
available to other consumers).
> Assuming when a message is pulled and not acked yet and no other
> consumer can pull it until its either acked or rejected back to the
> queue, will it have a certain timeout that it was pulled and wasn't
> acked for X amount of time?
There is no timeout on waiting for acks. Usually that is not a problem
since the common cases of a missing ack - network or client failure -
will result in the connection getting dropped (and thus trigger the
behaviour described above). Still, a timeout could be useful to, say,
deal with alive but unresponsive consumers. That has come up in
discussion before. Is there a specific use case you have in mind that
requires such functionality?
Regards,
Matthias.
More information about the rabbitmq-discuss
mailing list