diff options
| author | Arnaud Simon <arnaudsimon@apache.org> | 2007-10-19 12:59:19 +0000 |
|---|---|---|
| committer | Arnaud Simon <arnaudsimon@apache.org> | 2007-10-19 12:59:19 +0000 |
| commit | 35d111aa4f8bdcb98e2ae97bed3772604e9aef2f (patch) | |
| tree | ce012a93b55136626e293ef51485219e45e43c95 /qpid/java/client | |
| parent | ff36821da030a42f220a52dda81ca5e411df226c (diff) | |
| download | qpid-python-35d111aa4f8bdcb98e2ae97bed3772604e9aef2f.tar.gz | |
added args to exchange binding and set x-match to any as default
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@586408 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/client')
| -rw-r--r-- | qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java b/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java index 0159c0e09f..a3e2a8fa3a 100644 --- a/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java +++ b/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java @@ -26,6 +26,7 @@ import org.apache.qpid.client.failover.FailoverNoopSupport; 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.JMSException; 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 @@ public class AMQSession_0_10 extends AMQSession 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(); |
