RabbitMQ - purge a queue from all of its unacked messages

后端 未结 8 755
孤街浪徒
孤街浪徒 2020-12-29 03:03

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?

8条回答
  •  北荒
    北荒 (楼主)
    2020-12-29 04:00

    If you want to clear the contents of the queue, then you can use the AMQP method queue.purge: There is queue purge in AMQP: http://www.rabbitmq.com/amqp-0-9-1-reference.html#queue.purge

    You could do similar using the management plugin.

提交回复
热议问题