[rabbitmq-discuss] lost messages (.NET)

Marek Majkowski majek04 at gmail.com
Fri Jun 29 00:44:20 BST 2012


On Wed, Jun 27, 2012 at 6:26 PM, ivan.lysov <ivan.lysov at gmail.com> wrote:
> Hi, i'm new to RabbitMQ, currently trying out some real-world cases.
> The case is:
> 1) Producer publishes about 10 messages per second.
> 2) First consumer starts consuming the messages and after some consuming
> hangs for a while (Console.ReadLine())
> 3) While the first consumer is hanging second consumer starts to consume the
> messages from the same queue (not immidiatly, after n seconds)
> 4) I kill first consumer, watch logs and what i see is there are some
> messages that weren't acknowledged but deleted from the queue and i never
> see them.

This is rather unlikely.

Assuming you're using ACK's: a message is only removed after you ACK it.

But it will be only redelivered when  the client dies.

In other words: the message will be redelivered when it is unacked and the
consumer dies / disconnects.

Once that happens the message will be redelivered to other consumers
for a particular queue.

Marek


More information about the rabbitmq-discuss mailing list