RabbitMQ - purge a queue from all of its unacked messages

Bick picture Bick · Aug 4, 2014 · Viewed 37.8k times · Source

I have thousands of unacked messages in my dev environment which I can't restart.
Is there a way to remove (purge) all messages even if they are unacknowledged?

Answer

Acorn picture Acorn · Oct 3, 2015

Close the channel that the unacked messages reside on, which will nack them back into the queue, then call purge.