qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arnaudsi...@apache.org
Subject svn commit: r586408 - /incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java
Date Fri, 19 Oct 2007 12:59:19 GMT
Author: arnaudsimon
Date: Fri Oct 19 05:59:19 2007
New Revision: 586408

URL: http://svn.apache.org/viewvc?rev=586408&view=rev
Log:
added args to exchange binding and set x-match to any as default

Modified:
    incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java

Modified: incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java?rev=586408&r1=586407&r2=586408&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java
(original)
+++ incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java
Fri Oct 19 05:59:19 2007
@@ -26,6 +26,7 @@
 import org.apache.qpid.client.failover.FailoverProtectedOperation;
 import org.apache.qpid.client.protocol.AMQProtocolHandler;
 import org.apache.qpid.client.message.MessageFactoryRegistry;
+import org.apache.qpid.client.message.FiledTableSupport;
 import org.apache.qpidity.nclient.Session;
 import org.apache.qpidity.nclient.util.MessagePartListenerAdapter;
 import org.apache.qpidity.ErrorCode;
@@ -41,6 +42,8 @@
 import javax.jms.Destination;
 import java.util.concurrent.ConcurrentLinkedQueue;
 import java.util.UUID;
+import java.util.Map;
+import java.util.HashMap;
 
 /**
  * This is a 0.10 Session
@@ -189,7 +192,13 @@
                               final FieldTable arguments, final AMQShortString exchangeName)
             throws AMQException, FailoverException
     {
-        getQpidSession().queueBind(queueName.toString(), exchangeName.toString(), routingKey.toString(),
null);
+        Map args = FiledTableSupport.convertToMap(arguments);
+        // this is there only becasue the broker may expect a value for x-match
+        if( ! args.containsKey("x-match") )
+        {
+            args.put("x-match", "any");
+        }
+        getQpidSession().queueBind(queueName.toString(), exchangeName.toString(), routingKey.toString(),
args);
         // We need to sync so that we get notify of an error.
         getQpidSession().sync();
         getCurrentException();



Mime
View raw message