mirror of https://github.com/apache/activemq.git
Added test case to verify that the group id could be set using STOMP, in reference to:
http://forums.activemq.org/posts/list/442.page git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@382544 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
ed5d43b04f
commit
981cef5f84
|
@ -156,6 +156,35 @@ public class StompTest extends CombinationTestSupport {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void testJMSXGroupIdCanBeSet() throws Exception {
|
||||||
|
|
||||||
|
MessageConsumer consumer = session.createConsumer(queue);
|
||||||
|
|
||||||
|
String frame =
|
||||||
|
"CONNECT\n" +
|
||||||
|
"login: brianm\n" +
|
||||||
|
"passcode: wombats\n\n"+
|
||||||
|
Stomp.NULL;
|
||||||
|
sendFrame(frame);
|
||||||
|
|
||||||
|
frame = receiveFrame(10000);
|
||||||
|
assertTrue(frame.startsWith("CONNECTED"));
|
||||||
|
|
||||||
|
frame =
|
||||||
|
"SEND\n" +
|
||||||
|
"destination:/queue/" + getQueueName() + "\n" +
|
||||||
|
"JMSXGroupID: TEST\n\n" +
|
||||||
|
"Hello World" +
|
||||||
|
Stomp.NULL;
|
||||||
|
|
||||||
|
sendFrame(frame);
|
||||||
|
|
||||||
|
TextMessage message = (TextMessage) consumer.receive(1000);
|
||||||
|
assertNotNull(message);
|
||||||
|
assertEquals("TEST", ((ActiveMQTextMessage)message).getGroupID());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public void testSendMessageWithCustomHeadersAndSelector() throws Exception {
|
public void testSendMessageWithCustomHeadersAndSelector() throws Exception {
|
||||||
|
|
||||||
MessageConsumer consumer = session.createConsumer(queue, "foo = 'abc'");
|
MessageConsumer consumer = session.createConsumer(queue, "foo = 'abc'");
|
||||||
|
|
Loading…
Reference in New Issue