summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRajith Muditha Attapattu <rajith@apache.org>2010-08-04 19:44:17 +0000
committerRajith Muditha Attapattu <rajith@apache.org>2010-08-04 19:44:17 +0000
commit93b149047e2246ac941ee462d8b61b66a24e1e89 (patch)
tree696657ce2ace0c245ccd404731b4551f31daab51
parent194a3ce1ab546d8897c8532be4d9eace121f4191 (diff)
downloadqpid-python-93b149047e2246ac941ee462d8b61b66a24e1e89.tar.gz
QPID-2786
This fix is only for creating a durable subscription without a selector. When creating a durable subscription with a selector a different code path is used. The patch in QPID-2418 attempts to fix the code duplication among other things. Once that patch is applied I may have to readjust the code. I will be adding a test case to DurableSubscriptionTest.java once the code is sorted out. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@982381 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--java/client/src/main/java/org/apache/qpid/client/AMQTopic.java14
1 files changed, 13 insertions, 1 deletions
diff --git a/java/client/src/main/java/org/apache/qpid/client/AMQTopic.java b/java/client/src/main/java/org/apache/qpid/client/AMQTopic.java
index 98509c1b99..eb432d3318 100644
--- a/java/client/src/main/java/org/apache/qpid/client/AMQTopic.java
+++ b/java/client/src/main/java/org/apache/qpid/client/AMQTopic.java
@@ -106,8 +106,20 @@ public class AMQTopic extends AMQDestination implements Topic
public static AMQTopic createDurable010Topic(AMQTopic topic, String subscriptionName, AMQConnection connection)
throws JMSException
{
- return new AMQTopic(topic.getExchangeName(), ExchangeDefaults.TOPIC_EXCHANGE_CLASS, topic.getRoutingKey(), true, false,
+ if (topic.getDestSyntax() == AMQDestination.DestSyntax.BURL)
+ {
+ return new AMQTopic(topic.getExchangeName(), ExchangeDefaults.TOPIC_EXCHANGE_CLASS, topic.getRoutingKey(), true, false,
getDurableTopicQueueName(subscriptionName, connection), true);
+ }
+ else
+ {
+ return new AMQTopic(new AMQShortString(topic.getAddressName()),
+ ExchangeDefaults.TOPIC_EXCHANGE_CLASS,
+ new AMQShortString(topic.getSubject()),
+ true,
+ false,
+ getDurableTopicQueueName(subscriptionName, connection), true);
+ }
}
public static AMQShortString getDurableTopicQueueName(String subscriptionName, AMQConnection connection) throws JMSException