Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to - purge a rabbitmq queue using curl

I am checking is there way to purge a rabbitmq queue using curl ? I know using command line, but I am in need of something using curl?

Suggestions/help appreciated

Note : - with this link , I did not get exact curl command to be used

like image 567
Vishwa Avatar asked Jan 22 '26 02:01

Vishwa


1 Answers

Actually the link you provided does have the info:

/api/queues/vhost/name/contents

Contents of a queue. DELETE to purge.

Note you can't GET this.

For example:

curl -XDELETE -u admin http://localhost:15672/api/queues/%2f/queuetopurge/contents

The %2f is to reference the / vhost.

like image 167
Olivier Avatar answered Jan 24 '26 07:01

Olivier



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!