3

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

Vishwa
  • 607
  • 2
  • 11
  • 21

2 Answers2

6

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.

Community
  • 1
  • 1
Olivier
  • 2,571
  • 1
  • 17
  • 25
0

this is the rabbit according to rabbit api documents;

curl -i -u guest:guest -H "content-type:application/json" -XDELETE http://localhost:15672/api/queues/%2F/yourQueueName/contents
Tuncay Elvanagac
  • 1,048
  • 11
  • 13