The count shouldn't be negative so this might be a bug. The broker keeps track of the consumer count using a counter and the counter should be incremented on a new subscription and decremented when a subscription is removed. So if there are no consumers the count should be 0, not negative.
What version of ActiveMQ are you using? If it is older than 5.11.1 you could try a newer version to see if that helps. Would you be able to put together a test case to reproduce this issue? On Mon, Jun 8, 2015 at 4:42 PM, ALi <osat...@gmail.com> wrote: > When can the total consumer count be negative? We are using this metric to > know how many people is connected. > > We are getting this metric from the jmx perhaps a problem with the query in > check jmx eval? >