Book Image

Apache Karaf Cookbook

By : Jamie Goodyear, Johan Edstorm, Achim Nierbeck, Heath J Kesler
Book Image

Apache Karaf Cookbook

By: Jamie Goodyear, Johan Edstorm, Achim Nierbeck, Heath J Kesler

Overview of this book

Table of Contents (17 chapters)
Apache Karaf Cookbook
About the Authors
About the Reviewers

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:

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

Let's get some data loaded so that we can see what is happening.

How to do it…

Now, let's start sending some data through the broker in order to make this more entertaining and realistic. This recipe has some helper classes we can use to load the broker with data:

  1. Run the mvn clean install command in the example code under the Installing Apache ActiveMQ modules...