This closes #2500
This commit is contained in:
commit
e6ba1e2bc4
|
@ -124,6 +124,40 @@ public class FQQNOpenWireTest extends OpenWireTestBase {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testQueueConsumerReceiveTopicUsingFQQN() throws Exception {
|
||||||
|
|
||||||
|
SimpleString queueName1 = new SimpleString("sub.queue1");
|
||||||
|
SimpleString queueName2 = new SimpleString("sub.queue2");
|
||||||
|
server.createQueue(multicastAddress, RoutingType.MULTICAST, queueName1, null, false, false);
|
||||||
|
server.createQueue(multicastAddress, RoutingType.MULTICAST, queueName2, null, false, false);
|
||||||
|
Connection connection = factory.createConnection();
|
||||||
|
|
||||||
|
try {
|
||||||
|
connection.start();
|
||||||
|
Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
|
||||||
|
javax.jms.Queue fqqn1 = session.createQueue(multicastAddress.toString() + "::" + queueName1);
|
||||||
|
javax.jms.Queue fqqn2 = session.createQueue(multicastAddress.toString() + "::" + queueName2);
|
||||||
|
|
||||||
|
MessageConsumer consumer1 = session.createConsumer(fqqn1);
|
||||||
|
MessageConsumer consumer2 = session.createConsumer(fqqn2);
|
||||||
|
|
||||||
|
Topic topic = session.createTopic(multicastAddress.toString());
|
||||||
|
MessageProducer producer = session.createProducer(topic);
|
||||||
|
|
||||||
|
producer.send(session.createMessage());
|
||||||
|
|
||||||
|
Message m = consumer1.receive(2000);
|
||||||
|
assertNotNull(m);
|
||||||
|
|
||||||
|
m = consumer2.receive(2000);
|
||||||
|
assertNotNull(m);
|
||||||
|
|
||||||
|
} finally {
|
||||||
|
connection.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
//jms queues know no addresses, this test only shows
|
//jms queues know no addresses, this test only shows
|
||||||
//that it is possible for jms clients to receive from
|
//that it is possible for jms clients to receive from
|
||||||
|
|
Loading…
Reference in New Issue