activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gtu...@apache.org
Subject svn commit: r910942 - /activemq/branches/activemq-5.3/activemq-core/src/main/java/org/apache/activemq/broker/region/Topic.java
Date Wed, 17 Feb 2010 12:14:45 GMT
Author: gtully
Date: Wed Feb 17 12:14:45 2010
New Revision: 910942

URL: http://svn.apache.org/viewvc?rev=910942&view=rev
Log:
merge -c 904243 https://svn.apache.org/repos/asf/activemq/trunk - Fix for AMQ-2586 Topics
will now report a queue size of 0.

Modified:
    activemq/branches/activemq-5.3/activemq-core/src/main/java/org/apache/activemq/broker/region/Topic.java

Modified: activemq/branches/activemq-5.3/activemq-core/src/main/java/org/apache/activemq/broker/region/Topic.java
URL: http://svn.apache.org/viewvc/activemq/branches/activemq-5.3/activemq-core/src/main/java/org/apache/activemq/broker/region/Topic.java?rev=910942&r1=910941&r2=910942&view=diff
==============================================================================
--- activemq/branches/activemq-5.3/activemq-core/src/main/java/org/apache/activemq/broker/region/Topic.java
(original)
+++ activemq/branches/activemq-5.3/activemq-core/src/main/java/org/apache/activemq/broker/region/Topic.java
Wed Feb 17 12:14:45 2010
@@ -90,8 +90,9 @@
     public void initialize() throws Exception {
         super.initialize();
         if (store != null) {
-            int messageCount = store.getMessageCount();
-            destinationStatistics.getMessages().setCount(messageCount);
+            // AMQ-2586: Better to leave this stat at zero than to give the user misleading
metrics.
+            // int messageCount = store.getMessageCount();
+            // destinationStatistics.getMessages().setCount(messageCount);
         }
     }
 
@@ -563,7 +564,8 @@
     }
 
     protected void dispatch(final ConnectionContext context, Message message) throws Exception
{
-        destinationStatistics.getMessages().increment();
+        // AMQ-2586: Better to leave this stat at zero than to give the user misleading metrics.
+        // destinationStatistics.getMessages().increment();
         destinationStatistics.getEnqueues().increment();
         dispatchValve.increment();
         MessageEvaluationContext msgContext = null;
@@ -594,7 +596,8 @@
 
     public void messageExpired(ConnectionContext context, Subscription subs, MessageReference
reference) {
         broker.messageExpired(context, reference);
-        destinationStatistics.getMessages().decrement();
+        // AMQ-2586: Better to leave this stat at zero than to give the user misleading metrics.
+        // destinationStatistics.getMessages().decrement();
         destinationStatistics.getEnqueues().decrement();
         destinationStatistics.getExpired().increment();
         MessageAck ack = new MessageAck();



Mime
View raw message