RabbitMQ - purge a queue from all of its unacked messages

后端 未结 8 744
孤街浪徒
孤街浪徒 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 03:44

    For software developer use below code.

    channel.purgeQueue(queue-name);

    if we use this code the Queue will be clear and same queue will exist.

提交回复
热议问题