You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ce...@apache.org on 2013/06/04 04:34:00 UTC
svn commit: r1489275 -
/activemq/trunk/activemq-stomp/src/test/java/org/apache/activemq/transport/stomp/Stomp11Test.java
Author: ceposta
Date: Tue Jun 4 02:34:00 2013
New Revision: 1489275
URL: http://svn.apache.org/r1489275
Log:
wrote a test to answer question on mailing list, shows wildcard subscription with STOMP
Modified:
activemq/trunk/activemq-stomp/src/test/java/org/apache/activemq/transport/stomp/Stomp11Test.java
Modified: activemq/trunk/activemq-stomp/src/test/java/org/apache/activemq/transport/stomp/Stomp11Test.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-stomp/src/test/java/org/apache/activemq/transport/stomp/Stomp11Test.java?rev=1489275&r1=1489274&r2=1489275&view=diff
==============================================================================
--- activemq/trunk/activemq-stomp/src/test/java/org/apache/activemq/transport/stomp/Stomp11Test.java (original)
+++ activemq/trunk/activemq-stomp/src/test/java/org/apache/activemq/transport/stomp/Stomp11Test.java Tue Jun 4 02:34:00 2013
@@ -593,6 +593,44 @@ public class Stomp11Test extends StompTe
}
@Test
+ public void testSubscribeWithWildcardSubscription() throws Exception {
+ String connectFrame = "STOMP\n" +
+ "login:system\n" +
+ "passcode:manager\n" +
+ "accept-version:1.1\n" +
+ "host:localhost\n" +
+ "\n" + Stomp.NULL;
+ stompConnection.sendFrame(connectFrame);
+
+ String f = stompConnection.receiveFrame();
+ LOG.debug("Broker sent: " + f);
+
+ assertTrue(f.startsWith("CONNECTED"));
+
+ String message = "SEND\n" + "destination:/queue/a.b.c" +
+ "\n\n" + "Hello World" + Stomp.NULL;
+ stompConnection.sendFrame(message);
+
+ message = "SEND\n" + "destination:/queue/a.b" +
+ "\n\n" + "Hello World" + Stomp.NULL;
+ stompConnection.sendFrame(message);
+
+
+ String frame = "SUBSCRIBE\n" + "destination:/queue/a.b.>" + "\n" +
+ "id:12345\n" + "ack:auto\n\n" + Stomp.NULL;
+ stompConnection.sendFrame(frame);
+
+ StompFrame received = stompConnection.receive();
+ assertNotNull(received);
+
+ received = stompConnection.receive();
+ assertNotNull(received);
+
+ frame = "DISCONNECT\n" + "\n\n" + Stomp.NULL;
+ stompConnection.sendFrame(frame);
+ }
+
+ @Test
public void testQueueBrowerSubscription() throws Exception {
final int MSG_COUNT = 10;