Using the ActiveMQ query command

A convenient feature of an embedded ActiveMQ is the ability to run commands against the broker for monitoring broker activity. The query command provides basic information about the broker.

Getting ready

In order to get started, we need to get the activemq-broker feature installed as outlined in the previous recipe. Once that is installed, we can use the following command:

activemq

After typing the command, press the Tab key. This will list out all the available ActiveMQ commands as shown in the following screenshot:

Getting ready

Now, just running the command is pretty boring; there is not much to see in an empty broker.

Let's get ...

Get Apache Karaf Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.