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:


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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.