dstat command is a convenient way to see queue message statistics at a glance. It will list out the queues with queue size, the number of producers and consumers, the number of messages enqueued and dequeued, and the percentage of memory used.
In order to get started, we need to get the
activemq-broker feature installed.
If you have run any previous recipes, a good way to get a clean environment is to stop Karaf, delete the data directory, and restart. This will clean up any data from the previous runs. Remember to reinstall the
activemq-broker feature after restarting.
As an example, let's run the
activemq:dstat command, as shown in the following screenshot.
Not very impressive. Without data, these commands can be pretty boring. In the previous screenshot, we can see that we have one queue defined at this moment with no message, no producers, and no consumers. So, let's get some data loaded to see what is happening.