[rabbitmq-discuss] Lost messages after consumer crash
Simon MacMullen
simon at rabbitmq.com
Mon Feb 14 13:55:42 GMT 2011
On 14/02/11 11:50, Fabio Margarido wrote:
> I've noticed that if I crash (Ctrl+C) the consumer in the middle if
> the message reception flow and then start it up again, there's a gap
> in the messages delivered, i.e., the sequential numbers after the
> restart don't pick up from where they stopped.
<snip>
> Changing to transaction mode and manual ack didn't seem to help.
> Has anyone seen this behavior before? Am I missing something? How can
> I guarantee that all the messages are delivered?
Note: you must use manual acks. When you ack a message, you are saying
you have taken responsibility for it (persisted it or whatever).
RabbitMQ will never redeliver messages you have acked.
Note 2: when redelivering un-acked messages due to a client crash, the
messages get reinserted at the *beginning* of the queue. Thus you will
still see gaps in the message sequence, but those messages will be
delivered later.
Cheers, Simon
--
Simon MacMullen
Staff Engineer, RabbitMQ
SpringSource, a division of VMware
More information about the rabbitmq-discuss
mailing list