qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gordon Sim <g...@redhat.com>
Subject Re: x-match arguments and the 0-10 Java client
Date Mon, 06 Sep 2010 15:46:18 GMT
On 09/06/2010 04:20 PM, Robbie Gemmell wrote:
> Hi all,
>
> I would like to flag up a recent change I made for comment.
>
> In order to update the patch for QPID-2418 to allow the 0-10 Java
> client to properly handle DurableSubscriptions in the face of
> adding/removing/changing selectors for a given subscription name, I
> had to remove an arbitrary addition of the x-match argument to the
> bindings created by the 0-10 client (see below). This was corrupting
> the arguments sent to the broker and was not added when performing
> checks using isBound(), so I was seeing apparent failures to match
> arguments I (thought I) had just bound.
>
> The only reason I know for this to be there is so that users dont need
> to specify an option when using eg the Headers Exchange. As this is a
> required option im not sure adding it for them is the correct
> behaviour, but if this is truly the desired outcome then i think it
> should be performed by making the broker lenient to its exclusion
> rather than the other way around. I note the the C++ broker plays
> hardball in this situation and demands the value be set.

Yes, the "headers_exchange_requires_match_arg" rule in the spec states:

     When creating a binding between an exchange E, of type
     headers and any queue Q the arguments field MUST contain
     a key "x-match" to a value of type str8 which must equal
     either "any" or "all". If the arguments field does not
     contain a key "x-match" then an exception of type
     invalid-argument MUST be raised.

However as far as I'm aware, none of the other clients add it by 
default. I'm not sure I see much value in the code you have removed, 
especially given the problems you point out.

Does the java broker have a default if no explicit x-match is specified?

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


Mime
View raw message