diff options
author | Rajith Muditha Attapattu <rajith@apache.org> | 2011-06-29 22:50:10 +0000 |
---|---|---|
committer | Rajith Muditha Attapattu <rajith@apache.org> | 2011-06-29 22:50:10 +0000 |
commit | dc42ae20e5b0a55cd1ca55deffdd77f0a151927c (patch) | |
tree | 2fd04166ebad038c22ce5a6c6753f6f90488e637 | |
parent | 9fb3c96365f394d134d3bab643f05e0591bdf7a2 (diff) | |
download | qpid-python-dc42ae20e5b0a55cd1ca55deffdd77f0a151927c.tar.gz |
Merge branch 'QPID-3194' into trunk
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1141301 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | qpid/java/systests/src/main/java/org/apache/qpid/test/client/destination/AddressBasedDestinationTest.java | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/qpid/java/systests/src/main/java/org/apache/qpid/test/client/destination/AddressBasedDestinationTest.java b/qpid/java/systests/src/main/java/org/apache/qpid/test/client/destination/AddressBasedDestinationTest.java index fb389c5345..5dac9fb7c3 100644 --- a/qpid/java/systests/src/main/java/org/apache/qpid/test/client/destination/AddressBasedDestinationTest.java +++ b/qpid/java/systests/src/main/java/org/apache/qpid/test/client/destination/AddressBasedDestinationTest.java @@ -1069,4 +1069,24 @@ public class AddressBasedDestinationTest extends QpidBrokerTestCase Message m1 = replyToCons.receive(); assertNotNull("The reply to consumer should have received the messsage",m1); } + + public void testAltExchangeInAddressString() throws Exception + { + String addr1 = "ADDR:my-exchange/test; {create: always, node:{type: topic,x-declare:{alternate-exchange:'amq.fanout'}}}"; + Session session = _connection.createSession(false, Session.AUTO_ACKNOWLEDGE); + String altQueueAddr = "ADDR:my-alt-queue;{create: always, delete: receiver,node:{x-bindings:[{exchange:'amq.fanout'}] }}"; + MessageConsumer cons = session.createConsumer(session.createQueue(altQueueAddr)); + + MessageProducer prod = session.createProducer(session.createTopic(addr1)); + prod.send(session.createMessage()); + prod.close(); + assertNotNull("The consumer on the queue bound to the alt-exchange should receive the message",cons.receive(1000)); + + String addr2 = "ADDR:test-queue;{create:sender, delete: sender,node:{type:queue,x-declare:{alternate-exchange:'amq.fanout'}}}"; + prod = session.createProducer(session.createTopic(addr2)); + prod.send(session.createMessage()); + prod.close(); + assertNotNull("The consumer on the queue bound to the alt-exchange should receive the message",cons.receive(1000)); + cons.close(); + } } |