[rabbitmq-discuss] Re-declaring named exchange with passive argument set to true

Chris Duncan celldee at gmail.com
Thu Nov 26 01:02:47 GMT 2009


Hi,

Someone recently asked me a question about finding a named exchange  
without specifying the type in the declare method call. I've done  
some testing against RabbitMQ v1.7.0 and it seems that you cannot re- 
declare an existing exchange without supplying a type argument, even  
if the passive argument is used and set to true. I consistently get a  
503 error.

The 0-9-1 AMQP XML spec suggests that if you set the passive argument  
to true in the exchange declare method call, then type should be  
ignored.

====  Start of excerpt from 0-9-1 spec ====
<field name = "passive" domain = "bit" label = "do not create exchange">
         <doc>
           If set, the server will reply with Declare-Ok if the  
exchange already
           exists with the same name, and raise an error if not.  The  
client can
           use this to check whether an exchange exists without  
modifying the
           server state. When set, all other method fields except  
name and no-wait
           are ignored.  A declare with both passive and no-wait has  
no effect.
           Arguments are compared for semantic equivalence.
         </doc>

====  End of excerpt from 0-9-1 spec ====

Firstly, can anyone confirm that the behaviour I am observing  
regarding arguments passed in the exchange declare method is correct.  
There could be a problem with my client library that I haven't found.

Secondly, if the type argument is mandatory even when the passive  
argument is used and set to true, is this a bug in RabbitMQ?

Regards,

Chris

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20091126/7167f057/attachment.htm 


More information about the rabbitmq-discuss mailing list