diff --git a/activemq-core/src/main/java/org/apache/activemq/transport/stomp/Send.java b/activemq-core/src/main/java/org/apache/activemq/transport/stomp/Send.java index 430b452e97..b0c74ac0a9 100644 --- a/activemq-core/src/main/java/org/apache/activemq/transport/stomp/Send.java +++ b/activemq-core/src/main/java/org/apache/activemq/transport/stomp/Send.java @@ -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))); diff --git a/activemq-core/src/test/java/org/apache/activemq/transport/stomp/StompTest.java b/activemq-core/src/test/java/org/apache/activemq/transport/stomp/StompTest.java index 0ae561f9c7..34a337d6f2 100644 --- a/activemq-core/src/test/java/org/apache/activemq/transport/stomp/StompTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/transport/stomp/StompTest.java @@ -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"));