> The response just indicates the counters as -1, -1, -1, ...............and it is very hard to interpret this output, given that it does not reflect what each counter signifies. Can someone point towards the description or syntax of this output JSON?
You'll notice that there are 24 entries in the "counters" array. Each entry represents the number of messages added to the queue during that hour of the day where the day is specified by the "date". You can use the org.apache.activemq.artemis.api.core.management.DayCounterInfo object to deserialize the JSON to Java. > The example makes use of > org.apache.activemq.artemis.api.core.management.MessageCounterInfo class that I do not see available in artemis-jms-client-all-2.4.0.jar. That class is currently in the org.apache.activemq:artemis-server Maven module (lib/artemis-server-2.4.0.jar). I'll get it moved to org.apache.activemq:artemis-core-client so it will be included in the "all" client jar in future releases. > How can we run or test out the example against our broker set up to see the result of Queue Message counter related APIs as we need these for our development work further. I'm not exactly sure what you're asking here. If you want to run the example against your broker simply run 'mvn verify -PnoServer' and ensure the connection factory URL in jndi.properties as well as the JMX URL in MessageCounterExample.java both point to your broker. If that's not what you want please clarify. Justin On Mon, Jun 25, 2018 at 6:24 PM, Neha Sareen <neha.sar...@oracle.com> wrote: > Hi, > > > > We are working with Apache Artemis 2.4.0 and trying to determine the Queue > Message Counters. > > > > 1. Invoking the Jolokia API to display MessageCounterHistory: > > $ curl -u artemis:artemis -H "Content-Type: application/json" -X POST -d > '{"type":"exec", "mbean":"o > > > rg.apache.activemq.artemis:broker=\"RI_BRKR\",component= > addresses,address=\"BulkSend0.001.01.01\",su > > > bcomponent=queues,routing-type=\"anycast\",queue=\" > BulkSend0.001.01.01\"","operation":"listMessageCo > > > unterHistory"}' 'http://127.0.0.1:8128/console/jolokia' && echo > > > > {"request":{"mbean":"org.apache.activemq.artemis: > address=\"BulkSend0.001.01.01\",broker=\"RI_BRKR\", > > > component=addresses,queue=\"BulkSend0.001.01.01\",routing- > type=\"anycast\",subcomponent=queues","typ > > > e":"exec","operation":"listMessageCounterHistory"}," > value":"{\"dayCounters\":[{\"date\":\"6\/25\/18\ > > > ",\"counters\":[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,0,- > 1,-1,-1,-1,-1,-1,-1,-1,-1,-1]}]}","timesta > > > mp":1529960031,"status":200} > > > > The response just indicates the counters as -1, -1, -1, ...............and > it is very hard to interpret this output, given that it does not reflect > what each counter signifies. Can someone point towards the description or > syntax of this output JSON? > > All I see in the the API doc for QueueControl.listMessageCounterHostory() > is that it lists the message counter history for this queue. > > > > 2. Also tried to interpret and run the message-counters example that > comes with Artemis 2.4.0 (/apache-artemis-2.4.0/ > examples/features/standard/message-counters/src/main/ > java/org/apache/activemq/artemis/jms/example/MessageCounterExample.java). > The example makes use of > org.apache.activemq.artemis.api.core.management.MessageCounterInfo > class that I do not see available in artemis-jms-client-all-2.4.0.jar. > How can we run or test out the example against our broker set up to see the > result of Queue Message counter related APIs as we need these for our > development work further. > > > > Thanks > > Neha > > Oracle Marketing Cloud > > >