Uploaded image for project: 'ActiveMQ Classic'
  1. ActiveMQ Classic
  2. AMQ-3952

ActiveMQ 5.5.1 Java API Reset Statistic reset everything

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • 5.5.1
    • None
    • JMS client, JMX
    • None

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              nicolas.guyomar Nicolas Guyomar
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: