[rabbitmq-discuss] Acknowledged Messages Requeued

Ben Lewis stuckinwigan at gmail.com
Fri Nov 11 15:12:27 GMT 2011


Hi there,

I'm new to the concepts of AMQP and RabbitMQ and was wondering if someone
may be able to point me in the right direction or offer some advice.

I have got a direct exchange feeding a durable queue, if I load say 50,000
messages onto the queue and then start a consumer to work through those
item's.

My consumer creates the connection, then creates the model (I'm using .NET)
and sets the Qos prefetch count to 1, then calls BasicGet, processes the
message, sends an ack (BasicAck), then enumerates until BasicGet returns
null. Finally disposing the model and closing the connection.

If I restart the host I have the RabbitMQ broker running on (Windows) after
processing and ack'ing 40,000 messages while my consumer is working through
the remaining items, when the RabbitMQ broker comes back online the 40,000
messages are redelivered (even though they were acknowledged).

Is this supposed to happen? I would anticipate a number of them being
requeued if the broker was shutdown abruptly (i.e. loss of power) as it may
not have been written to disk at that stage, but a graceful restart I
thought it may flush any uncommitted changes to disk.

If this is by design, any suggestions or advice on how I can minimise the
number of redelivered messages if the broker dies/restarts?

Thanks in advance,

Ben
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20111111/7022b742/attachment.htm>


More information about the rabbitmq-discuss mailing list