Tahlil
Tahlil

Reputation: 1091

How to delete a queue in Rabbitmq programmatically in nodejs?

In my node server, I used amqplib (https://www.npmjs.com/package/amqplib) to interact with the local Rabbitmq server. I created a queue using the library in Rabbitmq. Is there any way to delete the queue? I couldn't find any solution in the amqplib docs I am not sure if there is one...Can I do it using amqplib or is there any other way in node js to create and delete queue in Rabbitmq?

Upvotes: 3

Views: 4434

Answers (1)

menya
menya

Reputation: 1525

There are two way:

  • create queue with autoDelete=true option, the queue will be deleted when no consumers
  • channel.deleteQueue() manually

Upvotes: 8

Related Questions