activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rajdav...@apache.org
Subject git commit: Fix for https://issues.apache.org/jira/browse/AMQ-4912
Date Mon, 09 Dec 2013 16:59:47 GMT
Updated Branches:
  refs/heads/trunk b21dc69e8 -> 3797da64f


Fix for https://issues.apache.org/jira/browse/AMQ-4912


Project: http://git-wip-us.apache.org/repos/asf/activemq/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/3797da64
Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/3797da64
Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/3797da64

Branch: refs/heads/trunk
Commit: 3797da64fcd13f2b8a6458fddc02a11c8f0c1fb6
Parents: b21dc69
Author: rajdavies <rajdavies@gmail.com>
Authored: Mon Dec 9 16:59:26 2013 +0000
Committer: rajdavies <rajdavies@gmail.com>
Committed: Mon Dec 9 16:59:26 2013 +0000

----------------------------------------------------------------------
 .../main/java/org/apache/activemq/plugin/StatisticsBroker.java  | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/3797da64/activemq-broker/src/main/java/org/apache/activemq/plugin/StatisticsBroker.java
----------------------------------------------------------------------
diff --git a/activemq-broker/src/main/java/org/apache/activemq/plugin/StatisticsBroker.java
b/activemq-broker/src/main/java/org/apache/activemq/plugin/StatisticsBroker.java
index 9679274..c1949c5 100644
--- a/activemq-broker/src/main/java/org/apache/activemq/plugin/StatisticsBroker.java
+++ b/activemq-broker/src/main/java/org/apache/activemq/plugin/StatisticsBroker.java
@@ -104,6 +104,8 @@ public class StatisticsBroker extends BrokerFilter {
                     DestinationStatistics stats = dest.getDestinationStatistics();
                     if (stats != null) {
                         ActiveMQMapMessage statsMessage = new ActiveMQMapMessage();
+                        statsMessage.setString("brokerName", regionBroker.getBrokerName());
+                        statsMessage.setString("brokerId", regionBroker.getBrokerId().toString());
                         statsMessage.setString("destinationName", dest.getActiveMQDestination().toString());
                         statsMessage.setLong("size", stats.getMessages().getCount());
                         statsMessage.setLong("enqueueCount", stats.getEnqueues().getCount());
@@ -223,7 +225,10 @@ public class StatisticsBroker extends BrokerFilter {
     }
 
     protected ActiveMQMapMessage prepareSubscriptionMessage(SubscriptionViewMBean subscriber)
throws JMSException {
+        Broker regionBroker = getBrokerService().getRegionBroker();
         ActiveMQMapMessage statsMessage = new ActiveMQMapMessage();
+        statsMessage.setString("brokerName", regionBroker.getBrokerName());
+        statsMessage.setString("brokerId", regionBroker.getBrokerId().toString());
         statsMessage.setString("destinationName", subscriber.getDestinationName());
         statsMessage.setString("clientId", subscriber.getClientId());
         statsMessage.setString("connectionId", subscriber.getConnectionId());


Mime
View raw message