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?
1 Answer
There are two way:
- create queue with
autoDelete=trueoption, the queue will be deleted when no consumers - channel.deleteQueue() manually