Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot remove an exchange if the same name is used by multiple bindings #37

Open
amybt opened this issue Jan 28, 2014 · 2 comments
Open

Comments

@amybt
Copy link

amybt commented Jan 28, 2014

If we have declared multiple direct exchanges with a same name, only different routing key then exchange->remove() will print an error in the RabbitMQ log.
The pattern would be like in http://www.rabbitmq.com/tutorials/tutorial-four-python.html
where multiple queues are binded to the same exchange. Check the "Multiple bindings" section in that tutorial.
If we do exchange->remove() when in some app that exchange is not needed anymore, it cannot actually be removed from RabbitMQ if other apps are also using the same exchange name.
Hence, even if we try to do exchange->deleteLater(), the destructor of QAMQP::Exchange will call remove() and we'll get the same behavior.

@amybt
Copy link
Author

amybt commented Jan 28, 2014

I believe that what we need is a function to declare an exchange without creating QAMQP::Exchange object

@mbroadst
Copy link

@amybt I believe the behavior of calling remove in the dtor is incorrect, I've corrected this in my fork qamqp-ng. You can look at the tutorials there as well in the "tutorials" folder, tutorial 4 from the rabbitmq site is implemented there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants