Kalènas
Kalènas

Reputation: 43

Delete Queues and Exchanges on RabbitMQ with HTTP API

I'have a question, I want to delete Queues and Exchanges on RabbitMQ with Curl and HTTP API.

I wanna use 2 options --if-empty=true and --if-unused=true.

but when I use it with curl, I have a error.

kalenas@localhost:~$ curl -XDELETE ${RABBIT_URL}/api/queues/<scope>/<queue> --if-empty=true --if-unused=true;
curl: option --if-empty=true: is unknown
curl: try 'curl --help' or 'curl --manual' for more information

Have you a idea ?

Upvotes: 0

Views: 1032

Answers (1)

jrhodin
jrhodin

Reputation: 669

Use

curl -XDELETE $RABBIT_URL/api/queues/$VHOST/<queue> -G -d 'if-empty=true' -d 'if-empty=true'

Upvotes: 1

Related Questions