You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ra...@apache.org on 2011/06/30 00:50:11 UTC
svn commit: r1141301 -
/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/client/destination/AddressBasedDestinationTest.java
Author: rajith
Date: Wed Jun 29 22:50:10 2011
New Revision: 1141301
URL: http://svn.apache.org/viewvc?rev=1141301&view=rev
Log:
Merge branch 'QPID-3194' into trunk
Modified:
qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/client/destination/AddressBasedDestinationTest.java
Modified: qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/client/destination/AddressBasedDestinationTest.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/client/destination/AddressBasedDestinationTest.java?rev=1141301&r1=1141300&r2=1141301&view=diff
==============================================================================
--- qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/client/destination/AddressBasedDestinationTest.java (original)
+++ qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/client/destination/AddressBasedDestinationTest.java Wed Jun 29 22:50:10 2011
@@ -1069,4 +1069,24 @@ public class AddressBasedDestinationTest
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();
+ }
}
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org