activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rob Davies <rajdav...@gmail.com>
Subject Re: Should we merge rev 904243 in the 5.3 Branch? (Disabling the queue size stat for topics)
Date Thu, 28 Jan 2010 23:45:23 GMT
Go for it!
On 28 Jan 2010, at 20:06, Hiram Chirino wrote:

> Any objections if I merge the following change into the 5.3 branch?
> It's been bothering me that topics would report a 'queue size'.
>
> Regards,
> Hiram
>
>
> ---------- Forwarded message ----------
> From:  <chirino@apache.org>
> Date: Thu, Jan 28, 2010 at 3:00 PM
> Subject: svn commit: r904243 -
> /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ 
> broker/region/Topic.java
> To: commits@activemq.apache.org
>
>
> Author: chirino
> Date: Thu Jan 28 20:00:48 2010
> New Revision: 904243
>
> URL: http://svn.apache.org/viewvc?rev=904243&view=rev
> Log:
> Fix for AMQ-2586
> Topics will now report a queue size of 0.
>
>
> Modified:
>    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ 
> broker/region/Topic.java
>
> Modified: activemq/trunk/activemq-core/src/main/java/org/apache/ 
> activemq/broker/region/Topic.java
> URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/Topic.java?rev=904243&r1=904242&r2=904243&view=diff
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ 
> broker/region/Topic.java
> (original)
> +++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ 
> broker/region/Topic.java
> Thu Jan 28 20:00:48 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();
>
>
>
>
>
> -- 
> Regards,
> Hiram
>
> Blog: http://hiramchirino.com
>
> Open Source SOA
> http://fusesource.com/

Rob Davies
http://twitter.com/rajdavies
I work here: http://fusesource.com
My Blog: http://rajdavies.blogspot.com/
I'm writing this: http://www.manning.com/snyder/






Mime
View raw message