[rabbitmq-discuss] Acknowledged Messages Requeued

Emile Joubert emile at rabbitmq.com
Mon Nov 14 13:01:46 GMT 2011


Hi Ben,

On 14/11/11 10:46, Ben Lewis wrote:
> If I run the publisher, then once that has enqueued 100,000 items run
> the consumer. If after it has consumed 20,000 and still consuming, I do
> a graceful start of the RabbitMQ broker's OS (running on Windows Server
> 2008, so Start, Shutdown/Restart), when the broker comes back online I
> have 100,000 items in the queue (even though approx 20,000 are consumed
> and acknowledged).

I'm only able to reproduce your result if I shut down the broker
forcefully. Stopping the the broker by using the service control manager
or using the rabbitmq-service.bat script does stop the broker
gracefully, allowing all acknowledgements to be written to disk. I can
only assume that hitting the Shutdown/Restart button on Windows does not
first stop all the running services.

If the broker is not stopped gracefully then clients must be prepared to
received duplicate messages for which acknowledgements were sent, but
not yet written to disk by the broker. That is the case regardless of
OS. That may be just a few messages, or tens of thousands.


-Emile



More information about the rabbitmq-discuss mailing list