diff options
| author | Rajith Muditha Attapattu <rajith@apache.org> | 2010-08-04 19:44:17 +0000 |
|---|---|---|
| committer | Rajith Muditha Attapattu <rajith@apache.org> | 2010-08-04 19:44:17 +0000 |
| commit | 552455048f71b00c905f70218186d627f0aff94f (patch) | |
| tree | 9417703b71c524081015d1029ef9be800161a6f3 /qpid/java/client/src | |
| parent | 2a3b6c26ab0dc39286eb2a3df952d6aabefd87fd (diff) | |
| download | qpid-python-552455048f71b00c905f70218186d627f0aff94f.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@982381 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/client/src')
| -rw-r--r-- | qpid/java/client/src/main/java/org/apache/qpid/client/AMQTopic.java | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/qpid/java/client/src/main/java/org/apache/qpid/client/AMQTopic.java b/qpid/java/client/src/main/java/org/apache/qpid/client/AMQTopic.java index 98509c1b99..eb432d3318 100644 --- a/qpid/java/client/src/main/java/org/apache/qpid/client/AMQTopic.java +++ b/qpid/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 |
