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

Search Discussions

  • Michael Bridgen at Nov 26, 2009 at 11:14 am
    Hi Chris,
    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.
    RabbitMQ implements AMQP 0-8 right now, which doesn't specify passive in
    quite the same way as 0-9-1. In 0-8, only auto-delete and durable are
    ignored.
    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.
    Yes indeed; 0-9-1 is much clearer than 0-8 on what the passive flag
    means. Essentially exchange.declare and queue.declare, with passive
    set, are different methods.
    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.
    If "without supplying a type argument" above means you send an empty
    string, you're getting back 503 Command Invalid because of AMQP 0-8 rule
    amqp_exchange_18, which says the server must send 503 if it doesn't
    support the exchange type.

    If you know the exchange type you should be able to send that and get a
    declare-ok or 404 back.
    Secondly, if the type argument is mandatory even when the passive
    argument is used and set to true, is this a bug in RabbitMQ?
    Not at the minute. We are working on 0-9-1 support, in the (fairly
    stable and up to date) branch amqp_0_9_1. In this branch right now,
    Queue.Declare has the new semantics, though Exchange.Declare doesn't
    quite yet.

    The client APIs are also being changed; e.g., in the Java client,
    there's now Channel.declarePassive(String name), and Channel.declare no
    longer takes an argument for passive.


    Cheers,
    Michael
  • Chris Duncan at Nov 26, 2009 at 12:12 pm
    Thanks for the information Michael.

    Regards,

    Chris
    2009/11/26 Michael Bridgen <mikeb at lshift.net>
    Hi Chris,
    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.
    RabbitMQ implements AMQP 0-8 right now, which doesn't specify passive in
    quite the same way as 0-9-1. In 0-8, only auto-delete and durable are
    ignored.
    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.
    Yes indeed; 0-9-1 is much clearer than 0-8 on what the passive flag
    means. Essentially exchange.declare and queue.declare, with passive
    set, are different methods.
    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.
    If "without supplying a type argument" above means you send an empty
    string, you're getting back 503 Command Invalid because of AMQP 0-8 rule
    amqp_exchange_18, which says the server must send 503 if it doesn't
    support the exchange type.

    If you know the exchange type you should be able to send that and get a
    declare-ok or 404 back.
    Secondly, if the type argument is mandatory even when the passive
    argument is used and set to true, is this a bug in RabbitMQ?
    Not at the minute. We are working on 0-9-1 support, in the (fairly
    stable and up to date) branch amqp_0_9_1. In this branch right now,
    Queue.Declare has the new semantics, though Exchange.Declare doesn't
    quite yet.

    The client APIs are also being changed; e.g., in the Java client,
    there's now Channel.declarePassive(String name), and Channel.declare no
    longer takes an argument for passive.


    Cheers,
    Michael


    _______________________________________________
    rabbitmq-discuss mailing list
    rabbitmq-discuss at lists.rabbitmq.com
    http://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss


    --
    Regards

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

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouprabbitmq-discuss @
categoriesrabbitmq
postedNov 26, '09 at 1:02a
activeNov 26, '09 at 12:12p
posts3
users2
websiterabbitmq.com
irc#rabbitmq

2 users in discussion

Chris Duncan: 2 posts Michael Bridgen: 1 post

People

Translate

site design / logo © 2022 Grokbase