diff options
| author | Rajith Muditha Attapattu <rajith@apache.org> | 2009-05-28 16:38:03 +0000 |
|---|---|---|
| committer | Rajith Muditha Attapattu <rajith@apache.org> | 2009-05-28 16:38:03 +0000 |
| commit | ca409e8e34960c9d050cf01391236974b56c2db1 (patch) | |
| tree | c964f93ec310aa2252a5e6e296fa6e38a95a0011 | |
| parent | 66214abd32c5fe22cbefc28ec5a49e8a53a51b43 (diff) | |
| download | qpid-python-ca409e8e34960c9d050cf01391236974b56c2db1.tar.gz | |
This is related to QPID-1875
The BindingURLParser is updated to grab the clientID and subscription to form the queue name.
I also added a test case to cover this.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@779651 13f79535-47bb-0310-9956-ffa450edef68
| -rw-r--r-- | java/client/src/test/java/org/apache/qpid/test/unit/client/destinationurl/DestinationURLTest.java | 12 | ||||
| -rw-r--r-- | java/common/src/main/java/org/apache/qpid/url/BindingURLParser.java | 2 |
2 files changed, 13 insertions, 1 deletions
diff --git a/java/client/src/test/java/org/apache/qpid/test/unit/client/destinationurl/DestinationURLTest.java b/java/client/src/test/java/org/apache/qpid/test/unit/client/destinationurl/DestinationURLTest.java index 2a66b86985..22e432a44f 100644 --- a/java/client/src/test/java/org/apache/qpid/test/unit/client/destinationurl/DestinationURLTest.java +++ b/java/client/src/test/java/org/apache/qpid/test/unit/client/destinationurl/DestinationURLTest.java @@ -177,6 +177,18 @@ public class DestinationURLTest extends TestCase assertTrue("Failed to throw an URISyntaxException when both the bindingkey and routingkey is specified",exceptionThrown); } + + public void testDestinationWithDurableTopic() throws URISyntaxException + { + + String url = "topic://amq.topic//testTopicD?durable='true'&autodelete='true'&clientid='test'&subscription='testQueueD'"; + + AMQBindingURL dest = new AMQBindingURL(url); + + assertTrue(dest.getExchangeClass().equals("topic")); + assertTrue(dest.getExchangeName().equals("amq.topic")); + assertTrue(dest.getQueueName().equals("test:testQueueD")); + } public static junit.framework.Test suite() { diff --git a/java/common/src/main/java/org/apache/qpid/url/BindingURLParser.java b/java/common/src/main/java/org/apache/qpid/url/BindingURLParser.java index f73ae9c232..7fe7d2e1da 100644 --- a/java/common/src/main/java/org/apache/qpid/url/BindingURLParser.java +++ b/java/common/src/main/java/org/apache/qpid/url/BindingURLParser.java @@ -417,7 +417,7 @@ public class BindingURLParser { if (_bindingURL.containsOption(BindingURL.OPTION_CLIENTID) && _bindingURL.containsOption(BindingURL.OPTION_SUBSCRIPTION)) { - queueName = _bindingURL.getOption(BindingURL.OPTION_CLIENTID + ":" + BindingURL.OPTION_SUBSCRIPTION); + queueName = _bindingURL.getOption(BindingURL.OPTION_CLIENTID) + ":" + _bindingURL.getOption(BindingURL.OPTION_SUBSCRIPTION); } else { |
