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