diff --git a/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireMessageConverter.java b/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireMessageConverter.java index d52b211e53..ce94ee2d32 100644 --- a/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireMessageConverter.java +++ b/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireMessageConverter.java @@ -647,9 +647,10 @@ public class OpenWireMessageConverter implements MessageConverter amqMsg.setDestination(dest); } - String groupId = (String) coreMessage.getObjectProperty(AMQ_MSG_GROUP_ID); - if (groupId != null) + Object value = coreMessage.getObjectProperty(AMQ_MSG_GROUP_ID); + if (value != null) { + String groupId = value.toString(); amqMsg.setGroupID(groupId); }