[rabbitmq-discuss] Queue Re-declaration
    Matthias Radestock 
    matthias at lshift.net
       
    Tue Jan 13 08:47:22 GMT 2009
    
    
  
Chuck,
Chuck Remes wrote:
> According to the 0-8 and 0-10 specs, if the queue already exists then  
> subsequent declarations with :durable and :auto-delete set ignore  
> those bits.
Correct.
> BTW, the same is true for exchanges.
Ditto.
> I could not find these provisions in the 0-9-1 spec which is odd.  
> However, I imagine these provisions hold true for it too.
Nope. The following rule has been added regarding the "passive" flag:
"If not set and the exchange exists, the server MUST check that the 
existing exchange has the same values for type, durable, and arguments 
fields.  The server MUST respond with Declare-Ok if the requested 
exchange matches these fields, and MUST raise a channel exception if not."
There is a similar rule for queues.
This corrects a flaw in the 0-8/9 version of the spec. Declarations are 
meant to be *assertions*, e.g. an exchange.declare should be read as "I 
assert that there shall be an exchange named X that is durable, etc". So 
it would be quite wrong for a declaration to return 'ok' when the 
existing entity does not have the specified settings.
Matthias.
    
    
More information about the rabbitmq-discuss
mailing list