3

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
  • as per my knowledge , once you subscribe/listen to the queue , it will be automatically deleted or removed from the queue. Commented Aug 21, 2019 at 13:04

1 Answer 1

8

There are two way:

  • create queue with autoDelete=true option, the queue will be deleted when no consumers
  • channel.deleteQueue() manually
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.