1 Reply Latest reply on Jan 23, 2013 4:26 AM by Andy Taylor

    Counting queue consumers cluster-wide

    rurounijones Newbie

      Hello all.


      I am using HornetQ inside a JBOSS AS7 cluster.


      I would like to be able to count the total number of consumers for a queue cluster-wide. Is there a method of doing this?


      I have looked around on the net and have not been able to find anything apart from someone asking basically the same question (http://stackoverflow.com/questions/8915339/how-can-i-find-out-the-number-of-consumers-of-a-queue-in-a-clustered-hornetq-env) on stack-overflow without answer.


      Any help would be much appreciated.

        • 1. Re: Counting queue consumers cluster-wide
          Andy Taylor Master

          The AS7 has its own anagement API and the CLI, you would probably need to ask in the AS7 forums for more info on that, however, if you are using the domain controller you can list what servers there are via something like '/host=master:read-children-names(child-type=server)' (/host=master/server=server-one:read-attribute(name=server-state) to see if it is running) and then you can navigate to the queue on each server and count the consumers, if you are using standalone servers you would need to connect to each one individually.