[rabbitmq-discuss] Question about Queue Bind/Unbind

Alvaro Videla videlalvaro at gmail.com
Fri Apr 9 04:29:32 BST 2010


Hi,

I'm writing some application using a topic exchange. 

Every time I start a consumer, it performs the following steps:

- access_request
- queue_declare
- exchange_declare
- queue_bind
- basic_consume

Lets say the topics are:

usa.news
usa.weather

So I launch the app and I specify that the queue "usa" will use this routing key: "usa.news"

So far so good, but when I stop the app and then I say that the queue "usa" must be bound by the "usa.weather" routing key, nothing happens. the binding is not changed.

Then I read the code of rabbit_exchange:add_binding/4 and it seems that it doesn't support overwriting the binding. 

Is it OK what I'm trying to do or should I always unbind the queue and then bind it again with the new routing key?

Thanks,

Alvaro



More information about the rabbitmq-discuss mailing list