[rabbitmq-discuss] cannot redeclare exchange with different type

Michael Klishin michael.s.klishin at gmail.com
Fri Dec 20 17:56:08 GMT 2013


2013/12/20 Roatin Marth <roatin.marth at gmail.com>

>  i assumed the call to declare_exchange was idempotent, meaning if it
> already existed, it wouldn't try to recreate it.
> in my example, i have an exchange "myExchange" of type fanout. my code was
> simply ensuring this exchange existed by calling
> declare_exchange("myExchange", fanout);
>

This assumption is correct.


> when i ran my code the second time, it was giving me that error as if i
> was trying to change the type.
> i checked the management page and the exchange was there with type fanout.
> after i deleted the exchange, the code worked as expected after subsequent
> reruns of the app.
>

This means some other attribute wasn't exactly the same.

-- 
MK

http://github.com/michaelklishin
http://twitter.com/michaelklishin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20131220/c2710a06/attachment.html>


More information about the rabbitmq-discuss mailing list