diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/message/impl/CoreMessage.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/message/impl/CoreMessage.java index d7165598c2..a1e86f5cbc 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/message/impl/CoreMessage.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/message/impl/CoreMessage.java @@ -291,8 +291,7 @@ public class CoreMessage extends RefCountMessage implements ICoreMessage { @Override public int getGroupSequence() { - final Integer integer = this.getIntProperty(Message.HDR_GROUP_SEQUENCE); - return integer == null ? 0 : integer; + return containsProperty(Message.HDR_GROUP_SEQUENCE) ? getIntProperty(Message.HDR_GROUP_SEQUENCE) : 0; } /** diff --git a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/converter/jms/ServerJMSMessage.java b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/converter/jms/ServerJMSMessage.java index 0ef2041fec..51e8adce1b 100644 --- a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/converter/jms/ServerJMSMessage.java +++ b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/converter/jms/ServerJMSMessage.java @@ -266,7 +266,11 @@ public class ServerJMSMessage implements Message { @Override public final int getIntProperty(String name) throws JMSException { - return message.getIntProperty(name); + if (MessageUtil.JMSXGROUPSEQ.equals(name)) { + return message.getGroupSequence(); + } else { + return message.getIntProperty(name); + } } @Override