Book Image

APACHE KARAF COOKBOOK

Book Image

APACHE KARAF COOKBOOK

Overview of this book

Table of Contents (17 chapters)
Apache Karaf Cookbook
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Using the ActiveMQ list command


The list command can be used to list out the brokers currently running inside the Karaf container.

Getting ready

In order to get started, we need to get the activemq-broker feature installed. Reference the activemq:query command, as shown in the following screenshot:

How to do it…

To list out all brokers currently running embedded inside this instance of Karaf, we can simply run the following command:

karaf@root()> activemq:list

This will list out the embedded broker names as follows:

brokerName = amq-broker

How it works…

This activemq command will invoke the JmxMBeansUtil.getAllBrokers class on the JMX connection and retrieve the name of any broker currently running.

See also

  • The Using the ActiveMQ query command recipe

  • The Using the ActiveMQ dstat command recipe