[rabbitmq-discuss] Queue Re-declaration

Jason J. W. Williams jasonjwwilliams at gmail.com
Tue Jan 13 23:06:15 GMT 2009


So if you make a mistake and declare an-in-use queue as non-durable
and need to change it, the only way to do so is to destroy the queue
and re-create it?

-J

On Tue, Jan 13, 2009 at 1:47 AM, Matthias Radestock <matthias at lshift.net> wrote:
> 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.
>
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> http://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>




More information about the rabbitmq-discuss mailing list