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 dd7879c9b0..508bac95cd 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 @@ -94,6 +94,8 @@ public class OpenWireMessageConverter implements MessageConverter receivedMessages = new ArrayList<>(); + subscriber.setMessageListener(receivedMessages::add); + topicConnection.start(); + + while (receivedMessages.size() == 0) { + Thread.sleep(1000); + } + + for (Message message : receivedMessages) { + assertNotNull(message); + assertNotNull(message.getStringProperty("_AMQ_NotifType")); + } + } + } + private void checkQueueEmpty(String qName) { PostOffice po = server.getPostOffice(); LocalQueueBinding binding = (LocalQueueBinding) po.getBinding(SimpleString.toSimpleString(qName));