This seems like a very basic operation but I cannot find a way to delete a named exchange in RabbitMQ. I'm running it on Windows and using the command line tools. At this point I would settle for a .NET API call to delete an exchange, if there exists one. Thank you.
Asked
Active
Viewed 3,452 times
2 Answers
4
Management plugin is fine, if you don't need to do it programmatically (but your question indicates otherwise).
There is a command in the .NET API to delete the exchange. It's IModel.ExchangeDelete
- which is also clearly called out in the API Specification.

theMayer
- 15,456
- 7
- 58
- 90
-
You're right. That was the intention in the original question (command line or programmatically) and I'm embarassed to say that somehow I completely overlooked ExchangeDelete in the Intellisense. Thanks. – Anshul Jan 27 '14 at 19:59
-
My follow up question is: In .NET, is there a way to find out if a named exchange exists? – Anshul Jan 27 '14 at 20:29
-
1You have to try declaring it, and if the channel gets closed you know it exists. Stupid, but that's the AMQP spec. – theMayer Jan 27 '14 at 23:22