qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robbie Gemmell <robbie.gemm...@gmail.com>
Subject x-match arguments and the 0-10 Java client
Date Mon, 06 Sep 2010 15:20:10 GMT
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.

I think the change should stand but I thought id point it out incase
others feel differently; the only alternative though would be to
ensure the client adds it everywhere.

Robbie.


>From r992856:
=========

--- qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java
(original)
+++ qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java
Sun Sep  5 18:51:15 2010
@@ -318,11 +318,6 @@ public class AMQSession_0_10 extends AMQ
        if (destination.getDestSyntax() == DestSyntax.BURL)
        {
            Map args = FieldTableSupport.convertToMap(arguments);
-            // this is there only because the broker may expect a
value for x-match
-            if( ! args.containsKey("x-match") )
-            {
-                args.put("x-match", "any");
-            }

            for (AMQShortString rk: destination.getBindingKeys())
            {

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


Mime
View raw message