activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r1160903 - in /activemq/activemq-apollo/trunk: apollo-dto/src/main/java/org/apache/activemq/apollo/dto/QueueMetricsDTO.java apollo-web/src/main/scala/org/apache/activemq/apollo/web/resources/BrokerResource.scala
Date Tue, 23 Aug 2011 22:12:19 GMT
Author: chirino
Date: Tue Aug 23 22:12:18 2011
New Revision: 1160903

URL: http://svn.apache.org/viewvc?rev=1160903&view=rev
Log:
Also track the number of currently connected consumers/producers as part of the queue metrics.

Modified:
    activemq/activemq-apollo/trunk/apollo-dto/src/main/java/org/apache/activemq/apollo/dto/QueueMetricsDTO.java
    activemq/activemq-apollo/trunk/apollo-web/src/main/scala/org/apache/activemq/apollo/web/resources/BrokerResource.scala

Modified: activemq/activemq-apollo/trunk/apollo-dto/src/main/java/org/apache/activemq/apollo/dto/QueueMetricsDTO.java
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-dto/src/main/java/org/apache/activemq/apollo/dto/QueueMetricsDTO.java?rev=1160903&r1=1160902&r2=1160903&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-dto/src/main/java/org/apache/activemq/apollo/dto/QueueMetricsDTO.java
(original)
+++ activemq/activemq-apollo/trunk/apollo-dto/src/main/java/org/apache/activemq/apollo/dto/QueueMetricsDTO.java
Tue Aug 23 22:12:18 2011
@@ -218,4 +218,19 @@ public class QueueMetricsDTO {
     @XmlAttribute(name="consumer_counter")
     public long consumer_counter;
 
+
+    /**
+     * The current number of producers attached to
+     * the queue.
+     */
+    @XmlAttribute(name="producer_count")
+    public long producer_count;
+
+    /**
+     * The current number of consumers attached to
+     * the queue.
+     */
+    @XmlAttribute(name="consumer_count")
+    public long consumer_count;
+
 }

Modified: activemq/activemq-apollo/trunk/apollo-web/src/main/scala/org/apache/activemq/apollo/web/resources/BrokerResource.scala
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-web/src/main/scala/org/apache/activemq/apollo/web/resources/BrokerResource.scala?rev=1160903&r1=1160902&r2=1160903&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-web/src/main/scala/org/apache/activemq/apollo/web/resources/BrokerResource.scala
(original)
+++ activemq/activemq-apollo/trunk/apollo-web/src/main/scala/org/apache/activemq/apollo/web/resources/BrokerResource.scala
Tue Aug 23 22:12:18 2011
@@ -198,6 +198,8 @@ case class BrokerResource() extends Reso
       rc.swapped_in_size_max += q.swapped_in_size_max
       rc.producer_counter += q.producer_counter
       rc.consumer_counter += q.consumer_counter
+      rc.producer_count += q.producer_count
+      rc.consumer_count += q.consumer_count
 
       if( q.isInstanceOf[AggregateQueueMetricsDTO] ) {
         rc.queues += q.asInstanceOf[AggregateQueueMetricsDTO].queues
@@ -750,6 +752,9 @@ case class BrokerResource() extends Reso
     rc.producer_counter = q.producer_counter
     rc.consumer_counter = q.consumer_counter
 
+    rc.producer_count = q.producers.size
+    rc.consumer_count = q.all_subscriptions.size
+
     rc
   }
 



Mime
View raw message