mirror of https://github.com/apache/activemq.git
added test case and fix for JMSType header
git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@382086 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
b5bba09207
commit
2f6054959a
|
@ -100,6 +100,10 @@ class Send implements StompCommand {
|
|||
if (priority != null) {
|
||||
msg.setJMSPriority(asInt(priority));
|
||||
}
|
||||
Object type = headers.remove(Stomp.Headers.Send.TYPE);
|
||||
if (type != null) {
|
||||
msg.setJMSType((String) type);
|
||||
}
|
||||
|
||||
msg.setJMSReplyTo(DestinationNamer.convert((String) headers.remove(Stomp.Headers.Send.REPLY_TO)));
|
||||
|
||||
|
|
|
@ -204,6 +204,8 @@ public class StompTest extends CombinationTestSupport {
|
|||
frame =
|
||||
"SEND\n" +
|
||||
"correlation-id:c123\n" +
|
||||
"priority:3\n" +
|
||||
"type:t345\n" +
|
||||
"JMSXGroupID:abc\n" +
|
||||
"foo:abc\n" +
|
||||
"bar:123\n" +
|
||||
|
@ -217,6 +219,8 @@ public class StompTest extends CombinationTestSupport {
|
|||
assertNotNull(message);
|
||||
assertEquals("Hello World", message.getText());
|
||||
assertEquals("JMSCorrelationID", "c123", message.getJMSCorrelationID());
|
||||
assertEquals("getJMSType", "t345", message.getJMSType());
|
||||
assertEquals("getJMSPriority", 3, message.getJMSPriority());
|
||||
assertEquals("foo", "abc", message.getStringProperty("foo"));
|
||||
assertEquals("bar", "123", message.getStringProperty("bar"));
|
||||
|
||||
|
|
Loading…
Reference in New Issue