Hi there,<br><br>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.<br><br>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.<br>
<br>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.<br>
<br>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).<br>
<br>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.<br>
<br>If this is by design, any suggestions or advice on how I can minimise the number of redelivered messages if the broker dies/restarts?<br><br>Thanks in advance,<br><br>Ben<br><br>