You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by "nicolas.guyomar" <ni...@thalesgroup.com> on 2012/07/27 16:43:12 UTC

ActiveMQ 5.5.1 Java API Reset Statistic reset everything

Hello everyone,

I have a simple question, this might not be a bug but a clarification on
your API : 

I'm using
org.apache.activemq.broker.jmx.DestinationView.resetStatistics()
to reset statistics I get from the JMX Java API, but I was expected that
only the "statistic numbers" would be reseted, and not the state of my queue
(number of pending messages for instance)

I'm wondering why the super.reset() method is called in
org.apache.activemq.broker.region.DestinationStatistics.reset() method.

 public void reset() {
        if (this.isDoReset()) {
            super.reset();
            enqueues.reset();
            dequeues.reset();
            dispatched.reset();
            inflight.reset();
            expired.reset();
        }
    }

Problem is, after a reset, if I lookup some queue size, I get 0, even if
there are still some message pending to be dequeued. The "number of pending
message" is apparently reseted in the "super.reset()" call.

Am I misunderstanding your API ?

Thank you for any clarification you could provide

Nicolas




--
View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-5-5-1-Java-API-Reset-Statistic-reset-everything-tp4654458.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: ActiveMQ 5.5.1 Java API Reset Statistic reset everything

Posted by "vani.csc" <va...@gmail.com>.
Hi,

 Iam tring to rest some counters for queue when i click on reset statistics
it is resetting all values is there any particular solution to reset only
specific values in activemq?



--
View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-5-5-1-Java-API-Reset-Statistic-reset-everything-tp4654458p4660221.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: ActiveMQ 5.5.1 Java API Reset Statistic reset everything

Posted by Dejan Bosanac <de...@nighttale.net>.
Hi Nicolas,

it sounds like a bug to me. Can you raise a Jira for it?

Regards
-- 
Dejan Bosanac
Senior Software Engineer | FuseSource Corp.
dejanb@fusesource.com | fusesource.com
skype: dejan.bosanac | twitter: @dejanb
blog: http://www.nighttale.net
ActiveMQ in Action: http://www.manning.com/snyder/


On Fri, Jul 27, 2012 at 4:43 PM, nicolas.guyomar
<ni...@thalesgroup.com> wrote:
> Hello everyone,
>
> I have a simple question, this might not be a bug but a clarification on
> your API :
>
> I'm using
> org.apache.activemq.broker.jmx.DestinationView.resetStatistics()
> to reset statistics I get from the JMX Java API, but I was expected that
> only the "statistic numbers" would be reseted, and not the state of my queue
> (number of pending messages for instance)
>
> I'm wondering why the super.reset() method is called in
> org.apache.activemq.broker.region.DestinationStatistics.reset() method.
>
>  public void reset() {
>         if (this.isDoReset()) {
>             super.reset();
>             enqueues.reset();
>             dequeues.reset();
>             dispatched.reset();
>             inflight.reset();
>             expired.reset();
>         }
>     }
>
> Problem is, after a reset, if I lookup some queue size, I get 0, even if
> there are still some message pending to be dequeued. The "number of pending
> message" is apparently reseted in the "super.reset()" call.
>
> Am I misunderstanding your API ?
>
> Thank you for any clarification you could provide
>
> Nicolas
>
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-5-5-1-Java-API-Reset-Statistic-reset-everything-tp4654458.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.