diff --git a/activemq-core/src/main/java/org/apache/activemq/plugin/StatisticsBroker.java b/activemq-core/src/main/java/org/apache/activemq/plugin/StatisticsBroker.java index c04b87b51b..1d10778d7c 100644 --- a/activemq-core/src/main/java/org/apache/activemq/plugin/StatisticsBroker.java +++ b/activemq-core/src/main/java/org/apache/activemq/plugin/StatisticsBroker.java @@ -104,6 +104,7 @@ public class StatisticsBroker extends BrokerFilter { statsMessage.setDouble("minEnqueueTime", stats.getProcessTime().getMinTime()); statsMessage.setLong("consumerCount", stats.getConsumers().getCount()); statsMessage.setLong("producerCount", stats.getProducers().getCount()); + statsMessage.setJMSCorrelationID(messageSend.getCorrelationId()); sendStats(producerExchange.getConnectionContext(), statsMessage, replyTo); } } @@ -154,6 +155,7 @@ public class StatisticsBroker extends BrokerFilter { File file = brokerService.getDataDirectoryFile(); answer = file != null ? file.getCanonicalPath() : ""; statsMessage.setString("dataDirectory", answer); + statsMessage.setJMSCorrelationID(messageSend.getCorrelationId()); sendStats(producerExchange.getConnectionContext(), statsMessage, replyTo); } else { super.send(producerExchange, messageSend);