activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject [39/51] [abbrv] [partial] activemq-web git commit: Add body.storage type
Date Thu, 14 Dec 2017 14:49:03 GMT
http://git-wip-us.apache.org/repos/asf/activemq-web/blob/7a7d976c/activemq-command-line-tools-reference.xml
----------------------------------------------------------------------
diff --git a/activemq-command-line-tools-reference.xml b/activemq-command-line-tools-reference.xml
index d9e1cff..1e763e4 100644
--- a/activemq-command-line-tools-reference.xml
+++ b/activemq-command-line-tools-reference.xml
@@ -1,2 +1,2 @@
-<div class="wiki-content maincontent"><h1 id="ActiveMQCommandLineToolsReference-CommandLineTools">Command Line Tools</h1><p>The current script contains the entire functionality to manage activemq.</p><ul><li><a shape="rect" href="#ActiveMQCommandLineToolsReference-activemq">activemq</a> - runs an activemq broker<br clear="none">(see <a shape="rect" href="unix-shell-script.xml">Unix Shell Script</a>)</li></ul><p>In versions prior 5.4.1 some management functionalities beyond controlling the service itself where part of the "activemq-admin" script.<br clear="none">This script is currently still part of the distribution to provide access to this for Windows users-</p><ul><li><a shape="rect" href="#ActiveMQCommandLineToolsReference-activemq-admin">activemq-admin</a> - manages a broker instance</li></ul><p>In versions prior to 5.0 the functionality of activemq-admin script was scattered over multiple scripts, such as:</p><ul><li><a shape="rect" href="#ActiveMQCommandLineToolsReference-sto
 p">shutdown</a> - shutdowns an activemq broker</li><li><a shape="rect" href="#ActiveMQCommandLineToolsReference-list">list</a> - lists all running brokers in the specified JMX context</li><li><a shape="rect" href="#ActiveMQCommandLineToolsReference-query">query</a> - queries the JMX context for broker statistics and information</li><li><a shape="rect" href="#ActiveMQCommandLineToolsReference-bstat">bstat</a> - predefined query that displays useful broker statistics</li><li><a shape="rect" href="#ActiveMQCommandLineToolsReference-browse">browse</a> - browse the messages of a specific queue</li><li><a shape="rect" href="#ActiveMQCommandLineToolsReference-purge">purge</a> - delete selected destination's messages that matches the message selector</li></ul><p><span class="confluence-anchor-link" id="ActiveMQCommandLineToolsReference-activemq"></span></p><h2 id="ActiveMQCommandLineToolsReference-activemqscript">activemq script<br clear="none"><br clear="none"></h2><div class="confluence-i
 nformation-macro confluence-information-macro-note"><span class="aui-icon aui-icon-small aui-iconfont-warning confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><p><strong>Description of this script is valid for Windows platform.</strong> For Unix platform it is valid for broker versions prior to 5.4.0. With version 5.4.0 and later, ActiveMQ comes with enhanced <a shape="rect" href="unix-shell-script.xml">Unix Shell Script</a></p></div></div><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Script Name</p></th><td colspan="1" rowspan="1" class="confluenceTd"><p>activemq.bat, activemq</p></td></tr><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Task Usage</p></th><td colspan="1" rowspan="1" class="confluenceTd"><p><em>activemq [options] [config]</em> or <em>java -jar run.jar start [options] [config]</em></p></td></tr><tr><th colspan="1" rowspan="1" class="confluenceTh"><p
 >Description</p></th><td colspan="1" rowspan="1" class="confluenceTd"><p>Script to run an activemq broker either by specifying a broker configuration file or through a broker URI configuration.</p></td></tr></tbody></table></div><p><strong>Options:</strong></p><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Option Name</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Syntax</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Example</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>System Define Option</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>-D&lt;key&gt;=&lt;value&gt;</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>-Dactivemq.home=c:/ActiveMQ</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Sets a systems property. i.e Systems.getProperty("activemq.home"); will r
 eturn c:/ActiveMQ</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>Help Option</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>-h or -? or --help</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>activemq --help</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Display the help messages for the activemq script.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>Version Option</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>--version</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>activemq --version</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Display the activemq version information.</p></td></tr></tbody></table></div><p><strong>Examples:</strong></p><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Example</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1
 " rowspan="1" class="confluenceTd"><p>activemq</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Runs a broker using the default 'xbean:activemq.xml' as the broker configuration file.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>activemq xbean:myconfig.xml</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Runs a broker using the file myconfig.xml as the broker configuration file that is located in the classpath.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>activemq xbean:file:./conf/broker1.xml</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Runs a broker using the file broker1.xml as the broker configuration file that is located in the relative file path ./conf/broker1.xml</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>activemq xbean:file:C:/ActiveMQ/conf/broker2.xml</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Runs a broker using the file broker2.xml as the broker c
 onfiguration file that is located in the absolute file path C:/ActiveMQ/conf/broker2.xml</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>activemq broker:(tcp://localhost:61616, tcp://localhost:5000)?useJmx=true</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Runs a broker with two transport connectors and JMX enabled.&#194;&#185;</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>activemq broker:(tcp://localhost:61616, network:tcp://localhost:5000)?persistent=false</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Runs a broker with 1 transport connector and 1 network connector with persistence disabled.&#194;&#185;</p></td></tr></tbody></table></div><p>For details on how to configure using broker URI refer to:&#160;<a shape="rect" href="broker-configuration-uri.xml">Broker Configuration URI</a></p><p><span class="confluence-anchor-link" id="ActiveMQCommandLineToolsReference-activemq-admin"></span></p><h2 id="ActiveMQComma
 ndLineToolsReference-activemq-admin">activemq-admin</h2><p>As of ActiveMQ 5.x, the above standalone utilities have been incorporated into the activemq-admin command (with the exception of the activemq script), as follows:</p><ul><li><a shape="rect" href="#ActiveMQCommandLineToolsReference-stop">activemq-admin stop</a></li><li><a shape="rect" href="#ActiveMQCommandLineToolsReference-list">activemq-admin list</a></li><li><a shape="rect" href="#ActiveMQCommandLineToolsReference-query">activemq-admin query</a></li><li><a shape="rect" href="#ActiveMQCommandLineToolsReference-bstat">activemq-admin bstat</a></li><li><a shape="rect" href="#ActiveMQCommandLineToolsReference-browse">activemq-admin browse</a></li></ul><p>The syntax of each task remains as described below. Note also that the activemq command is still supported.</p><p><span class="confluence-anchor-link" id="ActiveMQCommandLineToolsReference-stop"></span></p><h3 id="ActiveMQCommandLineToolsReference-stoptask">stop task</h3><div 
 class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Task Name</p></th><td colspan="1" rowspan="1" class="confluenceTd"><p>stop</p></td></tr><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Task Usage</p></th><td colspan="1" rowspan="1" class="confluenceTd"><p><em>activemq-admin stop [options] [broker names]</em></p></td></tr><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th><td colspan="1" rowspan="1" class="confluenceTd"><p>Script to stop a running activemq broker. This task requires that JMX is enabled.</p></td></tr></tbody></table></div><p><strong>Options:</strong></p><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Option Name</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Syntax</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Example</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>
 Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>Stop All Option</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>--all</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>stop --all</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Stops all registered brokers in the specified JMX context</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>JMX URL Option</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>--jmxurl &lt;url&gt;</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>--jmxurl service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Change the JMX service url to connect to. By default it connects to: service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>JMX Authentication Option</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>--jmxuser user --jmxpas
 sword password</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>--jmxuser smx --jmxpassword smx</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>For cases where username/password based authentication of the JMX client is required. Not set by default.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>System Define Option</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>-D&lt;key&gt;=&lt;value&gt;</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>-Dactivemq.home=c:/ActiveMQ</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Sets a systems property. i.e Systems.getProperty("activemq.home"); will return c:/ActiveMQ</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>Help Option</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>-h or -? or --help</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>--help</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Display the help mes
 sages for the stop script.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>Version Option</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>--version</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>activemq --version</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Display the activemq version information.</p></td></tr></tbody></table></div><p><strong>Examples:</strong></p><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Example</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>activemq-admin stop</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Stops the only running broker in the default JMX context. It assumes that there is only one running broker.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>activemq-admin stop --jmxurl service:jmx:rm
 i:///jndi/rmi://remotehost:1099/jmxrmi --all</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Stops all the running broker in the specified JMX context.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>activemq-admin stop localhost</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Stops the broker named 'localhost' in the default JMX context.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>activemq-admin stop localhost remotehost</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Stops the brokers 'localhost' and 'remotehost' in the default JMX context.</p></td></tr></tbody></table></div><p><span class="confluence-anchor-link" id="ActiveMQCommandLineToolsReference-list"></span></p><h3 id="ActiveMQCommandLineToolsReference-listtask">list task</h3><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Task Name</p></th><td colspan="1" rowspan="1" class=
 "confluenceTd"><p>list</p></td></tr><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Task Usage</p></th><td colspan="1" rowspan="1" class="confluenceTd"><p><em>activemq-admin list [options]</em></p></td></tr><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th><td colspan="1" rowspan="1" class="confluenceTd"><p>Script to list the names of all running brokers in the specified JMX context. This task requires that JMX is enabled.</p></td></tr></tbody></table></div><p><strong>Options:</strong></p><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Option Name</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Syntax</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Example</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>JMX URL Option</p></td><td colspan="1" rowspan="1" class="confl
 uenceTd"><p>--jmxurl &lt;url&gt;</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>--jmxurl service:jmx:rmi:///jndi/rmi://remotehost:1099/jmxrmi</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Change the JMX service url to connect to. By default it connects to: service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>JMX Authentication Option</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>--jmxuser user --jmxpassword password</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>--jmxuser smx --jmxpassword smx</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>For cases where username/password based authentication of the JMX client is required. Not set by default.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>System Define Option</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>-D&lt;key&gt;=&lt;value&gt;</p></td><td colspan="1" rowspan=
 "1" class="confluenceTd"><p>-Dactivemq.home=c:/ActiveMQ</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Sets a systems property. i.e Systems.getProperty("activemq.home"); will return c:/ActiveMQ</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>Help Option</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>-h or -? or --help</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>--help</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Display the help messages for the list script.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>Version Option</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>--version</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>activemq --version</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Display the activemq version information.</p></td></tr></tbody></table></div><p><strong>Examples:</strong></p><div class="table-wrap"><table class="confluenceTable
 "><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Example</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>activemq-admin list</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Lists the names of all running brokers in the default JMX context.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>activemq-admin list --jmxurl service:jmx:rmi:///jndi/rmi://remotehost:1099/jmxrmi</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>List the names of all running brokers in the specified JMX context.</p></td></tr></tbody></table></div><p><span class="confluence-anchor-link" id="ActiveMQCommandLineToolsReference-query"></span></p><h3 id="ActiveMQCommandLineToolsReference-querytask">query task</h3><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Task Name</p></th><td colspan="1" rowspa
 n="1" class="confluenceTd"><p>query</p></td></tr><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Task Usage</p></th><td colspan="1" rowspan="1" class="confluenceTd"><p><em>activemq-admin query [options]</em></p></td></tr><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th><td colspan="1" rowspan="1" class="confluenceTd"><p>Script to query the specified JMX context for mbean attributes and information. This script requires that JMX is enabled.</p></td></tr></tbody></table></div><p><strong>Options:</strong></p><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Option Name</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Syntax</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Example</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>Predefined Query Option</p></td><td colspan="
 1" rowspan="1" class="confluenceTd"><p>-Q&lt;type&gt;=&lt;name&gt;</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>-QTopic=TEST.FOO, -QBroker=*host</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Predefined object name query option that queries a specific type of mbean object based on its type and selected identifier. Refer to the mbean reference table below for details.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>&#160;</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>-xQ&lt;type&gt;=&lt;name&gt;</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>-xQTopic=ActiveMQ.Advisory.*, -xQNetworkConnector=*</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Predefined object name query option that removes all mbeans that matches the query from the search result. Refer to the mbean reference table below for details.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>Object Name Query Option</p></td
 ><td colspan="1" rowspan="1" class="confluenceTd"><p>--objname &lt;object name query&gt;</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>--objname Type=<strong>Connect</strong>,BrokerName=local*</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Query option loosely based on the JMX object name format, which lets you filter mbeans based on their object name information. Refer to the mbean reference table below for details.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>&#160;</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>--xobjname &lt;object name query&gt;</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>--xobjname Type=Topic,Destination=ActiveMQ.Advisory.*</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Object name query that removes all mbeans that matches the query from the search result. Refer to the mbean reference table below for details.</p></td></tr><tr><td colspan="1" rowspan="1" class="conflue
 nceTd"><p>View Option</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>--view &lt;view list&gt;</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>--view Type,BrokerName,Destination,EnqueueCount,DequeueCount</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Lets you specify the attributes and object name information to view. If the view is omitted, all attributes and information will be displayed.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>JMX URL Option</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>--jmxurl &lt;url&gt;</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>--jmxurl service:jmx:rmi:///jndi/rmi://remotehost:1099/jmxrmi</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Change the JMX service url to connect to. By default it connects to: service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>JMX Authentication Option</p>
 </td><td colspan="1" rowspan="1" class="confluenceTd"><p>--jmxuser user --jmxpassword password</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>--jmxuser smx --jmxpassword smx</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>For cases where username/password based authentication of the JMX client is required. Not set by default.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>System Define Option</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>-D&lt;key&gt;=&lt;value&gt;</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>-Dactivemq.home=c:/ActiveMQ</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Sets a systems property. i.e Systems.getProperty("activemq.home"); will return c:/ActiveMQ</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>Help Option</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>-h or -? or --help</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>--help<
 /p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Display the help messages for the query script.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>Version Option</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>--version</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>activemq --version</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Display the activemq version information.</p></td></tr></tbody></table></div><p><strong>Examples:</strong></p><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Example</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>activemq-admin query</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Display all attributes and object name information of all registered mbeans in the default JMX context.</p></td></tr><tr><td colspan="1" r
 owspan="1" class="confluenceTd"><p>activemq-admin query -QTopic=TEST.FOO</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Display all the attributes and object name information of the destination topic 'TEST.FOO'</p></td></tr></tbody></table></div><div class="table-wrap"><table class="confluenceTable"><tbody><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>activemq-admin query -QQueue=*</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Display all the attributes and object name information of all registered queues.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>activemq-admin query -QTopic=*.FOO -xQTopic=ActiveMQ.Advisory.*</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Display all the attributes and object name information of all topics that ends with '.FOO' except those that also begins with 'ActiveMQ.Advisory.'.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>activemq-admin query -QBroker=local???
 ? --view Type,BrokerName,EnqueueCount,DequeueCount</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Display the object type, broker name, enqueue count, and dequeue count information for all 9-letter brokers that begins with 'local'.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>activemq-admin query --objname Type=<strong>Connect</strong>,BrokerName=localhost -xQNetworkConnector=*</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Display all the attributes and object name information for all connections and connectors for broker 'localhost' except its network connectors.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>activemq-admin query --objname Type=Connection --xobjname Type=Connection,BrokerName=localhost</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Display all the attributes and object name information for all registered connections except those belonging to broker 'localhost'.</p></td></tr><tr><t
 d colspan="1" rowspan="1" class="confluenceTd"><p>activemq-admin query -QQueue=???? --objname Type=Connection --xobjname BrokerName=remote*</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Display all the attributes and object name information for all 4-letter queues and connections except those belonging to a broker that begins with 'remote'.</p></td></tr></tbody></table></div><p><strong>ActiveMQ MBean Reference:</strong></p><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Mbean Type</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Properties / ObjectName</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Attributes</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>Broker</p></td><td colspan="1" rowspan="1" class="confluenceTd"><ul><li><strong>Type</strong>=Broker</li><li><strong>BrokerName</strong>=&lt;broker identifier&gt;</li></ul></td><td colspan="1" rowspan="1
 " class="confluenceTd"><ul><li>BrokerId</li><li>TotalEnqueueCount</li><li>TotalDequeueCount</li><li>TotalConsumerCount</li><li>TotalMessages</li><li>TotalMessagesCached</li><li>MemoryLimit</li><li>MemoryPercentageUsed</li></ul></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>Destination</p></td><td colspan="1" rowspan="1" class="confluenceTd"><ul><li><strong>Type</strong>=Queue|Topic</li><li><strong>Destination</strong>=&lt;destination identifier&gt;</li><li><strong>BrokerName</strong>=&lt;name of broker&gt;</li></ul></td><td colspan="1" rowspan="1" class="confluenceTd"><ul><li>EnqueueCount</li><li>DequeueCount</li><li>ConsumerCount</li><li>Messages</li><li>MessagesCached</li></ul></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>NetworkConnector</p></td><td colspan="1" rowspan="1" class="confluenceTd"><ul><li><strong>Type</strong>=NetworkConnector</li><li><strong>BrokerName</strong>=&lt;connector identifierr&gt;</li></ul></td><td colspan="1" rowspan
 ="1" class="confluenceTd"><p>&#160;</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>Connector</p></td><td colspan="1" rowspan="1" class="confluenceTd"><ul><li><strong>Type</strong>=Connector</li><li><strong>ConnectorName</strong>=&lt;connector identifier&gt;</li><li><strong>BrokerName</strong>=&lt;name of broker&gt;</li></ul></td><td colspan="1" rowspan="1" class="confluenceTd"><ul><li>EnqueueCount</li><li>DequeueCount</li></ul></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>Connection</p></td><td colspan="1" rowspan="1" class="confluenceTd"><ul><li><strong>Type</strong>=Connection</li><li><strong>Connection</strong>=&lt;connection identifier&gt;</li><li><strong>BrokerName</strong>=&lt;name of broker&gt;</li></ul></td><td colspan="1" rowspan="1" class="confluenceTd"><ul><li>EnqueueCount</li><li>DequeueCount</li><li>DispatchQueueSize</li><li>Active</li><li>Blocked</li><li>Connected</li><li>Slow</li></ul></td></tr></tbody></table></div><p><span c
 lass="confluence-anchor-link" id="ActiveMQCommandLineToolsReference-bstat"></span></p><h3 id="ActiveMQCommandLineToolsReference-bstattask">bstat task</h3><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Task Name</p></th><td colspan="1" rowspan="1" class="confluenceTd"><p>bstat</p></td></tr><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Task Usage</p></th><td colspan="1" rowspan="1" class="confluenceTd"><p><em>activemq-admin bstat</em> [broker name]</p></td></tr><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th><td colspan="1" rowspan="1" class="confluenceTd"><p>Predefined query script that displays useful statistics regarding a broker and its components.</p></td></tr></tbody></table></div><p><strong>Examples:</strong></p><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Example</p></th><th colspan="1" rowspan="1"
  class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>activemq-admin bstat</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Display useful statistics for all registered brokers in the default JMX context.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>activemq-admin bstat localhost</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Display useful statistics for the registered broker 'localhost'.</p></td></tr></tbody></table></div><p><span class="confluence-anchor-link" id="ActiveMQCommandLineToolsReference-browse"></span></p><h3 id="ActiveMQCommandLineToolsReference-browsetask">browse task</h3><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Task Name</p></th><td colspan="1" rowspan="1" class="confluenceTd"><p>browse</p></td></tr><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Task Usage</p></th><td colspan="1" row
 span="1" class="confluenceTd"><p><em>activemq-admin browse --amqurl &lt;broker url&gt; [options] &lt;destinations&gt;</em> or <em>java -jar run.jar browse --amqurl &lt;broker url&gt; [options] &lt;destinations&gt;</em></p></td></tr><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th><td colspan="1" rowspan="1" class="confluenceTd"><p>Script to browse selected destinations' messages.&#160; The browse operation may not return all messages due to limitations of broker configuration and system resources.</p></td></tr></tbody></table></div><p><strong>Options:</strong></p><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Option Name</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Syntax</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Example</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceT
 d"><p>Broker URL Option</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>--amqurl &lt;url&gt;</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>--amqurl tcp://localhost:61616</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Specify the broker URL to connect to.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>Message Selector Option</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>--msgsel "&lt;msgsel1,msgsel2,...&gt;"</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>--msgsel "JMSMessageID='*:10',JMSPriority&gt;5"</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Allows you to filter the specific messages to view. Place the entire selector criteria in double quotes " ". You can use wildcard queries by enclosing the string message property in ' '. Other than using wildcard queries to filter string properties, other queries follows the message selector format.</p></td></tr><tr><td colspan="1" rowspan="
 1" class="confluenceTd"><p>Group View Option</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>-V[header | custom | body]</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>-Vheader, -Vcustom, -Vbody</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Let's you specify a specific group of message attributes to view. The header view shows all the standard JMS message headers. The custom view shows all the custom fields added to each JMS message. The body view shows the message body of the JMS message.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>Specific View Option</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>--view &lt;attr1&gt;,[header:|custom:]&lt;attr2&gt;,...</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>--view JMSMessageID='*:10',custom:MyCustomField</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Let's you specifically select a specific message attribute. It allows you to select specif
 ic attributes from the JMS and custom headers. You could add the tags header: and custom: to explicitly specify where the attribute belongs to. Refer to the message header table below for details.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>System Define Option</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>-D&lt;key&gt;=&lt;value&gt;</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>-Dactivemq.home=c:/ActiveMQ</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Sets a systems property. i.e Systems.getProperty("activemq.home"); will return c:/ActiveMQ</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>Help Option</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>-h or -? or --help</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>--help</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Display the help messages for the browse script.</p></td></tr><tr><td colspan="1" rowspan="1" cl
 ass="confluenceTd"><p>Version Option</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>--version</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>activemq --version</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Display the activemq version information.</p></td></tr></tbody></table></div><p><strong>Examples:</strong></p><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Example</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>activemq-admin browse --amqurl tcp://localhost:61616 TEST.FOO</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Prints the JMS message header, custom message header, and message body of the messages in the queue 'TEST.FOO'</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>activemq-admin browse --amqurl tcp://localhost:61616 -Vheader,body TEST.
 FOO</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Prints the JMS message header and message body of the messages in the queue 'TEST.FOO'</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>activemq-admin browse --amqurl tcp://localhost:61616 -Vheader --view custom:MyCustomField TEST.FOO TEST.BAR</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Prints all the JMS message header and the custom field 'MyCustomField' of the messages in the queue 'TEST.FOO' and 'TEST.BAR'.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>activemq-admin browse --amqurl tcp://localhost:61616 --msgsel "JMSMessageID='*:10',JMSPriority&gt;5" TEST.FOO</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Prints all the attributes of the messages in the queue 'TEST.FOO' that has a JMSMessageID that matches the wildcard query *:10 and has a JMSPriority greater than 5.</p></td></tr></tbody></table></div><p><strong>JMS Message Header Reference:</s
 trong></p><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Header Name</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Header Type</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>JMSCorrelation ID</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>String</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>JMSDelivery Mode</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>int (1-Non-Persistent, 2-Persistent)</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>JMSDestination</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>javax.jms.Destination</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>JMSExpiration</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>long</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>JMSMessageID</p></td><td colspan="1" rowspan="1" class="confluenc
 eTd"><p>String</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>JMSPriority</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>int</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>JMSRedelivered</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>boolean</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>JMSReplyTo</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>javax.jms.Destination</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>JMSTimestamp</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>long</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>JMSType</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>String</p></td></tr></tbody></table></div><p><span class="confluence-anchor-link" id="ActiveMQCommandLineToolsReference-purge"></span></p><h3 id="ActiveMQCommandLineToolsReference-purgetask">purge task</h3><div class="table-wrap"><table cl
 ass="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Task Name</p></th><td colspan="1" rowspan="1" class="confluenceTd"><p>purge</p></td></tr><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Task Usage</p></th><td colspan="1" rowspan="1" class="confluenceTd"><p><em>activemq-admin purge</em> [purge-options] &lt;destinations&gt;</p></td></tr><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th><td colspan="1" rowspan="1" class="confluenceTd"><p>Delete selected destination's messages that matches the message selector.</p></td></tr></tbody></table></div><p><strong>Options:</strong></p><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Option Name</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Syntax</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Example</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></
 tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>JMX URL Option</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>--jmxurl &lt;url&gt;</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>--jmxurl service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Change the JMX service url to connect to. By default it connects to: service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>JMX Authentication Option</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>--jmxuser user --jmxpassword password</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>--jmxuser smx --jmxpassword smx</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>For cases where username/password based authentication of the JMX client is required. Not set by default.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>Message Selector Opt
 ion</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>--msgsel "&lt;msgsel1,msgsel2,...&gt;"</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>--msgsel "JMSMessageID='*:10',JMSPriority&gt;5"</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Allows you to filter the specific messages to view. Place the entire selector criteria in double quotes " ". You can use wildcard queries by enclosing the string message property in ' '. Other than using wildcard queries to filter string properties, other queries follows the message selector format.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>System Define Option</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>-D&lt;key&gt;=&lt;value&gt;</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>-Dactivemq.home=c:/ActiveMQ</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Sets a systems property. i.e Systems.getProperty("activemq.home"); will return c:/ActiveMQ</p></td>
 </tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>Help Option</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>-h or -? or --help</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>--help</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Display the help messages for the browse script.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>Version Option</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>--version</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>activemq --version</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Display the activemq version information.</p></td></tr></tbody></table></div><p><strong>Examples:</strong></p><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Example</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p
 >activemq-admin purge FOO.BAR</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Delete all the messages in queue FOO.BAR</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>activemq-admin purge --msgsel "JMSMessageID='*:10',JMSPriority&gt;5" FOO.*</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Delete all the messages in the destinations that matches FOO.* and has a JMSMessageID in", the header field that matches the wildcard *:10, and has a JMSPriority field &gt; 5 in the", queue FOO.BAR <br clear="none"> To use wildcard queries, the field must be a string and the query enclosed in ''</p></td></tr></tbody></table></div><h3 id="ActiveMQCommandLineToolsReference-dstattask">dstat task</h3><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Task Name</p></th><td colspan="1" rowspan="1" class="confluenceTd"><p>dstat</p></td></tr><tr><th colspan="1" rowspan="1" class="confluenceTh"><p
 >Task Usage</p></th><td colspan="1" rowspan="1" class="confluenceTd"><p><em>activemq-admin dstat</em> [destination type]</p></td></tr><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th><td colspan="1" rowspan="1" class="confluenceTd"><p>Predefined query script that displays useful statistics regarding destinations on a broker.</p></td></tr></tbody></table></div><p><strong>Examples:</strong></p><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Example</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>activemq-admin dstat</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Display useful statistics for all destinations on the broker in the default JMX context.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>activemq-admin dstat topics</p></td><td colspan="1" rowspan="1" class
 ="confluenceTd"><p>Display useful statistics for the Topics that currently exist on the Broker.</p></td></tr></tbody></table></div></div>
+<div class="wiki-content maincontent"><h1>Command Line Tools</h1><p>The current script contains the entire functionality to manage activemq.</p><ul><li><link ac:anchor="activemq"></link> - runs an activemq broker<br clear="none">(see <link><page ri:content-title="Unix Shell Script"></page></link>)</li></ul><p>In versions prior 5.4.1 some management functionalities beyond controlling the service itself where part of the "activemq-admin" script.<br clear="none">This script is currently still part of the distribution to provide access to this for Windows users-</p><ul><li><link ac:anchor="activemq-admin"></link> - manages a broker instance</li></ul><p>In versions prior to 5.0 the functionality of activemq-admin script was scattered over multiple scripts, such as:</p><ul><li><link ac:anchor="stop"><plain-text-link-body>shutdown</plain-text-link-body></link> - shutdowns an activemq broker</li><li><link ac:anchor="list"></link> - lists all running brokers in the specified JMX context</li>
 <li><link ac:anchor="query"></link> - queries the JMX context for broker statistics and information</li><li><link ac:anchor="bstat"></link> - predefined query that displays useful broker statistics</li><li><link ac:anchor="browse"></link> - browse the messages of a specific queue</li><li><link ac:anchor="purge"></link> - delete selected destination's messages that matches the message selector</li></ul><p><structured-macro ac:macro-id="02495172-e5eb-48f0-8318-c4ff5647a8e3" ac:name="anchor" ac:schema-version="1"><parameter ac:name="">activemq</parameter></structured-macro></p><h2>activemq script<br clear="none"><br clear="none"></h2><structured-macro ac:macro-id="ec719b30-dc47-4944-91ed-20e2eb36914c" ac:name="note" ac:schema-version="1"><rich-text-body><p><strong>Description of this script is valid for Windows platform.</strong> For Unix platform it is valid for broker versions prior to 5.4.0. With version 5.4.0 and later, ActiveMQ comes with enhanced <link><page ri:content-title="Uni
 x Shell Script"></page></link></p></rich-text-body></structured-macro><table><tbody><tr><th colspan="1" rowspan="1"><p>Script Name</p></th><td colspan="1" rowspan="1"><p>activemq.bat, activemq</p></td></tr><tr><th colspan="1" rowspan="1"><p>Task Usage</p></th><td colspan="1" rowspan="1"><p><em>activemq [options] [config]</em> or <em>java -jar run.jar start [options] [config]</em></p></td></tr><tr><th colspan="1" rowspan="1"><p>Description</p></th><td colspan="1" rowspan="1"><p>Script to run an activemq broker either by specifying a broker configuration file or through a broker URI configuration.</p></td></tr></tbody></table><p><strong>Options:</strong></p><table><tbody><tr><th colspan="1" rowspan="1"><p>Option Name</p></th><th colspan="1" rowspan="1"><p>Syntax</p></th><th colspan="1" rowspan="1"><p>Example</p></th><th colspan="1" rowspan="1"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1"><p>System Define Option</p></td><td colspan="1" rowspan="1"><p>-D&lt;key&gt;=&lt;va
 lue&gt;</p></td><td colspan="1" rowspan="1"><p>-Dactivemq.home=c:/ActiveMQ</p></td><td colspan="1" rowspan="1"><p>Sets a systems property. i.e Systems.getProperty("activemq.home"); will return c:/ActiveMQ</p></td></tr><tr><td colspan="1" rowspan="1"><p>Help Option</p></td><td colspan="1" rowspan="1"><p>-h or -? or --help</p></td><td colspan="1" rowspan="1"><p>activemq --help</p></td><td colspan="1" rowspan="1"><p>Display the help messages for the activemq script.</p></td></tr><tr><td colspan="1" rowspan="1"><p>Version Option</p></td><td colspan="1" rowspan="1"><p>--version</p></td><td colspan="1" rowspan="1"><p>activemq --version</p></td><td colspan="1" rowspan="1"><p>Display the activemq version information.</p></td></tr></tbody></table><p><strong>Examples:</strong></p><table><tbody><tr><th colspan="1" rowspan="1"><p>Example</p></th><th colspan="1" rowspan="1"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1"><p>activemq</p></td><td colspan="1" rowspan="1"><p>Runs a broke
 r using the default 'xbean:activemq.xml' as the broker configuration file.</p></td></tr><tr><td colspan="1" rowspan="1"><p>activemq xbean:myconfig.xml</p></td><td colspan="1" rowspan="1"><p>Runs a broker using the file myconfig.xml as the broker configuration file that is located in the classpath.</p></td></tr><tr><td colspan="1" rowspan="1"><p>activemq xbean:file:./conf/broker1.xml</p></td><td colspan="1" rowspan="1"><p>Runs a broker using the file broker1.xml as the broker configuration file that is located in the relative file path ./conf/broker1.xml</p></td></tr><tr><td colspan="1" rowspan="1"><p>activemq xbean:file:C:/ActiveMQ/conf/broker2.xml</p></td><td colspan="1" rowspan="1"><p>Runs a broker using the file broker2.xml as the broker configuration file that is located in the absolute file path C:/ActiveMQ/conf/broker2.xml</p></td></tr><tr><td colspan="1" rowspan="1"><p>activemq broker:(tcp://localhost:61616, tcp://localhost:5000)?useJmx=true</p></td><td colspan="1" rowspan="1
 "><p>Runs a broker with two transport connectors and JMX enabled.&#194;&#185;</p></td></tr><tr><td colspan="1" rowspan="1"><p>activemq broker:(tcp://localhost:61616, network:tcp://localhost:5000)?persistent=false</p></td><td colspan="1" rowspan="1"><p>Runs a broker with 1 transport connector and 1 network connector with persistence disabled.&#194;&#185;</p></td></tr></tbody></table><p>For details on how to configure using broker URI refer to:&#160;<link><page ri:content-title="Broker Configuration URI"></page></link></p><p><structured-macro ac:macro-id="a3804351-d111-4c58-b42c-e4a84ece705b" ac:name="anchor" ac:schema-version="1"><parameter ac:name="">activemq-admin</parameter></structured-macro></p><h2>activemq-admin</h2><p>As of ActiveMQ 5.x, the above standalone utilities have been incorporated into the activemq-admin command (with the exception of the activemq script), as follows:</p><ul><li><link ac:anchor="stop"><plain-text-link-body>activemq-admin stop</plain-text-link-body></
 link></li><li><link ac:anchor="list"><plain-text-link-body>activemq-admin list</plain-text-link-body></link></li><li><link ac:anchor="query"><plain-text-link-body>activemq-admin query</plain-text-link-body></link></li><li><link ac:anchor="bstat"><plain-text-link-body>activemq-admin bstat</plain-text-link-body></link></li><li><link ac:anchor="browse"><plain-text-link-body>activemq-admin browse</plain-text-link-body></link></li></ul><p>The syntax of each task remains as described below. Note also that the activemq command is still supported.</p><p><structured-macro ac:macro-id="9f87a0cb-cbd3-4abc-9afd-7e4c0a4d1b4e" ac:name="anchor" ac:schema-version="1"><parameter ac:name="">stop</parameter></structured-macro></p><h3>stop task</h3><table><tbody><tr><th colspan="1" rowspan="1"><p>Task Name</p></th><td colspan="1" rowspan="1"><p>stop</p></td></tr><tr><th colspan="1" rowspan="1"><p>Task Usage</p></th><td colspan="1" rowspan="1"><p><em>activemq-admin stop [options] [broker names]</em></p>
 </td></tr><tr><th colspan="1" rowspan="1"><p>Description</p></th><td colspan="1" rowspan="1"><p>Script to stop a running activemq broker. This task requires that JMX is enabled.</p></td></tr></tbody></table><p><strong>Options:</strong></p><table><tbody><tr><th colspan="1" rowspan="1"><p>Option Name</p></th><th colspan="1" rowspan="1"><p>Syntax</p></th><th colspan="1" rowspan="1"><p>Example</p></th><th colspan="1" rowspan="1"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1"><p>Stop All Option</p></td><td colspan="1" rowspan="1"><p>--all</p></td><td colspan="1" rowspan="1"><p>stop --all</p></td><td colspan="1" rowspan="1"><p>Stops all registered brokers in the specified JMX context</p></td></tr><tr><td colspan="1" rowspan="1"><p>JMX URL Option</p></td><td colspan="1" rowspan="1"><p>--jmxurl &lt;url&gt;</p></td><td colspan="1" rowspan="1"><p>--jmxurl service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi</p></td><td colspan="1" rowspan="1"><p>Change the JMX service url to conne
 ct to. By default it connects to: service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi</p></td></tr><tr><td colspan="1" rowspan="1"><p>JMX Authentication Option</p></td><td colspan="1" rowspan="1"><p>--jmxuser user --jmxpassword password</p></td><td colspan="1" rowspan="1"><p>--jmxuser smx --jmxpassword smx</p></td><td colspan="1" rowspan="1"><p>For cases where username/password based authentication of the JMX client is required. Not set by default.</p></td></tr><tr><td colspan="1" rowspan="1"><p>System Define Option</p></td><td colspan="1" rowspan="1"><p>-D&lt;key&gt;=&lt;value&gt;</p></td><td colspan="1" rowspan="1"><p>-Dactivemq.home=c:/ActiveMQ</p></td><td colspan="1" rowspan="1"><p>Sets a systems property. i.e Systems.getProperty("activemq.home"); will return c:/ActiveMQ</p></td></tr><tr><td colspan="1" rowspan="1"><p>Help Option</p></td><td colspan="1" rowspan="1"><p>-h or -? or --help</p></td><td colspan="1" rowspan="1"><p>--help</p></td><td colspan="1" rowspan="1"><p>Display 
 the help messages for the stop script.</p></td></tr><tr><td colspan="1" rowspan="1"><p>Version Option</p></td><td colspan="1" rowspan="1"><p>--version</p></td><td colspan="1" rowspan="1"><p>activemq --version</p></td><td colspan="1" rowspan="1"><p>Display the activemq version information.</p></td></tr></tbody></table><p><strong>Examples:</strong></p><table><tbody><tr><th colspan="1" rowspan="1"><p>Example</p></th><th colspan="1" rowspan="1"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1"><p>activemq-admin stop</p></td><td colspan="1" rowspan="1"><p>Stops the only running broker in the default JMX context. It assumes that there is only one running broker.</p></td></tr><tr><td colspan="1" rowspan="1"><p>activemq-admin stop --jmxurl service:jmx:rmi:///jndi/rmi://remotehost:1099/jmxrmi --all</p></td><td colspan="1" rowspan="1"><p>Stops all the running broker in the specified JMX context.</p></td></tr><tr><td colspan="1" rowspan="1"><p>activemq-admin stop localhost</p></td><t
 d colspan="1" rowspan="1"><p>Stops the broker named 'localhost' in the default JMX context.</p></td></tr><tr><td colspan="1" rowspan="1"><p>activemq-admin stop localhost remotehost</p></td><td colspan="1" rowspan="1"><p>Stops the brokers 'localhost' and 'remotehost' in the default JMX context.</p></td></tr></tbody></table><p><structured-macro ac:macro-id="6801ac7e-543d-4646-8225-36df3eb041a2" ac:name="anchor" ac:schema-version="1"><parameter ac:name="">list</parameter></structured-macro></p><h3>list task</h3><table><tbody><tr><th colspan="1" rowspan="1"><p>Task Name</p></th><td colspan="1" rowspan="1"><p>list</p></td></tr><tr><th colspan="1" rowspan="1"><p>Task Usage</p></th><td colspan="1" rowspan="1"><p><em>activemq-admin list [options]</em></p></td></tr><tr><th colspan="1" rowspan="1"><p>Description</p></th><td colspan="1" rowspan="1"><p>Script to list the names of all running brokers in the specified JMX context. This task requires that JMX is enabled.</p></td></tr></tbody></tab
 le><p><strong>Options:</strong></p><table><tbody><tr><th colspan="1" rowspan="1"><p>Option Name</p></th><th colspan="1" rowspan="1"><p>Syntax</p></th><th colspan="1" rowspan="1"><p>Example</p></th><th colspan="1" rowspan="1"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1"><p>JMX URL Option</p></td><td colspan="1" rowspan="1"><p>--jmxurl &lt;url&gt;</p></td><td colspan="1" rowspan="1"><p>--jmxurl service:jmx:rmi:///jndi/rmi://remotehost:1099/jmxrmi</p></td><td colspan="1" rowspan="1"><p>Change the JMX service url to connect to. By default it connects to: service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi</p></td></tr><tr><td colspan="1" rowspan="1"><p>JMX Authentication Option</p></td><td colspan="1" rowspan="1"><p>--jmxuser user --jmxpassword password</p></td><td colspan="1" rowspan="1"><p>--jmxuser smx --jmxpassword smx</p></td><td colspan="1" rowspan="1"><p>For cases where username/password based authentication of the JMX client is required. Not set by default.</p></t
 d></tr><tr><td colspan="1" rowspan="1"><p>System Define Option</p></td><td colspan="1" rowspan="1"><p>-D&lt;key&gt;=&lt;value&gt;</p></td><td colspan="1" rowspan="1"><p>-Dactivemq.home=c:/ActiveMQ</p></td><td colspan="1" rowspan="1"><p>Sets a systems property. i.e Systems.getProperty("activemq.home"); will return c:/ActiveMQ</p></td></tr><tr><td colspan="1" rowspan="1"><p>Help Option</p></td><td colspan="1" rowspan="1"><p>-h or -? or --help</p></td><td colspan="1" rowspan="1"><p>--help</p></td><td colspan="1" rowspan="1"><p>Display the help messages for the list script.</p></td></tr><tr><td colspan="1" rowspan="1"><p>Version Option</p></td><td colspan="1" rowspan="1"><p>--version</p></td><td colspan="1" rowspan="1"><p>activemq --version</p></td><td colspan="1" rowspan="1"><p>Display the activemq version information.</p></td></tr></tbody></table><p><strong>Examples:</strong></p><table><tbody><tr><th colspan="1" rowspan="1"><p>Example</p></th><th colspan="1" rowspan="1"><p>Description
 </p></th></tr><tr><td colspan="1" rowspan="1"><p>activemq-admin list</p></td><td colspan="1" rowspan="1"><p>Lists the names of all running brokers in the default JMX context.</p></td></tr><tr><td colspan="1" rowspan="1"><p>activemq-admin list --jmxurl service:jmx:rmi:///jndi/rmi://remotehost:1099/jmxrmi</p></td><td colspan="1" rowspan="1"><p>List the names of all running brokers in the specified JMX context.</p></td></tr></tbody></table><p><structured-macro ac:macro-id="36aa53c3-86fd-402d-9eb1-8fb13ac5b9bf" ac:name="anchor" ac:schema-version="1"><parameter ac:name="">query</parameter></structured-macro></p><h3>query task</h3><table><tbody><tr><th colspan="1" rowspan="1"><p>Task Name</p></th><td colspan="1" rowspan="1"><p>query</p></td></tr><tr><th colspan="1" rowspan="1"><p>Task Usage</p></th><td colspan="1" rowspan="1"><p><em>activemq-admin query [options]</em></p></td></tr><tr><th colspan="1" rowspan="1"><p>Description</p></th><td colspan="1" rowspan="1"><p>Script to query the spe
 cified JMX context for mbean attributes and information. This script requires that JMX is enabled.</p></td></tr></tbody></table><p><strong>Options:</strong></p><table><tbody><tr><th colspan="1" rowspan="1"><p>Option Name</p></th><th colspan="1" rowspan="1"><p>Syntax</p></th><th colspan="1" rowspan="1"><p>Example</p></th><th colspan="1" rowspan="1"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1"><p>Predefined Query Option</p></td><td colspan="1" rowspan="1"><p>-Q&lt;type&gt;=&lt;name&gt;</p></td><td colspan="1" rowspan="1"><p>-QTopic=TEST.FOO, -QBroker=*host</p></td><td colspan="1" rowspan="1"><p>Predefined object name query option that queries a specific type of mbean object based on its type and selected identifier. Refer to the mbean reference table below for details.</p></td></tr><tr><td colspan="1" rowspan="1"><p>&#160;</p></td><td colspan="1" rowspan="1"><p>-xQ&lt;type&gt;=&lt;name&gt;</p></td><td colspan="1" rowspan="1"><p>-xQTopic=ActiveMQ.Advisory.*, -xQNetworkCo
 nnector=*</p></td><td colspan="1" rowspan="1"><p>Predefined object name query option that removes all mbeans that matches the query from the search result. Refer to the mbean reference table below for details.</p></td></tr><tr><td colspan="1" rowspan="1"><p>Object Name Query Option</p></td><td colspan="1" rowspan="1"><p>--objname &lt;object name query&gt;</p></td><td colspan="1" rowspan="1"><p>--objname Type=<strong>Connect</strong>,BrokerName=local*</p></td><td colspan="1" rowspan="1"><p>Query option loosely based on the JMX object name format, which lets you filter mbeans based on their object name information. Refer to the mbean reference table below for details.</p></td></tr><tr><td colspan="1" rowspan="1"><p>&#160;</p></td><td colspan="1" rowspan="1"><p>--xobjname &lt;object name query&gt;</p></td><td colspan="1" rowspan="1"><p>--xobjname Type=Topic,Destination=ActiveMQ.Advisory.*</p></td><td colspan="1" rowspan="1"><p>Object name query that removes all mbeans that matches the 
 query from the search result. Refer to the mbean reference table below for details.</p></td></tr><tr><td colspan="1" rowspan="1"><p>View Option</p></td><td colspan="1" rowspan="1"><p>--view &lt;view list&gt;</p></td><td colspan="1" rowspan="1"><p>--view Type,BrokerName,Destination,EnqueueCount,DequeueCount</p></td><td colspan="1" rowspan="1"><p>Lets you specify the attributes and object name information to view. If the view is omitted, all attributes and information will be displayed.</p></td></tr><tr><td colspan="1" rowspan="1"><p>JMX URL Option</p></td><td colspan="1" rowspan="1"><p>--jmxurl &lt;url&gt;</p></td><td colspan="1" rowspan="1"><p>--jmxurl service:jmx:rmi:///jndi/rmi://remotehost:1099/jmxrmi</p></td><td colspan="1" rowspan="1"><p>Change the JMX service url to connect to. By default it connects to: service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi</p></td></tr><tr><td colspan="1" rowspan="1"><p>JMX Authentication Option</p></td><td colspan="1" rowspan="1"><p>--jmxuser 
 user --jmxpassword password</p></td><td colspan="1" rowspan="1"><p>--jmxuser smx --jmxpassword smx</p></td><td colspan="1" rowspan="1"><p>For cases where username/password based authentication of the JMX client is required. Not set by default.</p></td></tr><tr><td colspan="1" rowspan="1"><p>System Define Option</p></td><td colspan="1" rowspan="1"><p>-D&lt;key&gt;=&lt;value&gt;</p></td><td colspan="1" rowspan="1"><p>-Dactivemq.home=c:/ActiveMQ</p></td><td colspan="1" rowspan="1"><p>Sets a systems property. i.e Systems.getProperty("activemq.home"); will return c:/ActiveMQ</p></td></tr><tr><td colspan="1" rowspan="1"><p>Help Option</p></td><td colspan="1" rowspan="1"><p>-h or -? or --help</p></td><td colspan="1" rowspan="1"><p>--help</p></td><td colspan="1" rowspan="1"><p>Display the help messages for the query script.</p></td></tr><tr><td colspan="1" rowspan="1"><p>Version Option</p></td><td colspan="1" rowspan="1"><p>--version</p></td><td colspan="1" rowspan="1"><p>activemq --version
 </p></td><td colspan="1" rowspan="1"><p>Display the activemq version information.</p></td></tr></tbody></table><p><strong>Examples:</strong></p><table><tbody><tr><th colspan="1" rowspan="1"><p>Example</p></th><th colspan="1" rowspan="1"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1"><p>activemq-admin query</p></td><td colspan="1" rowspan="1"><p>Display all attributes and object name information of all registered mbeans in the default JMX context.</p></td></tr><tr><td colspan="1" rowspan="1"><p>activemq-admin query -QTopic=TEST.FOO</p></td><td colspan="1" rowspan="1"><p>Display all the attributes and object name information of the destination topic 'TEST.FOO'</p></td></tr></tbody></table><table><tbody><tr><td colspan="1" rowspan="1"><p>activemq-admin query -QQueue=*</p></td><td colspan="1" rowspan="1"><p>Display all the attributes and object name information of all registered queues.</p></td></tr><tr><td colspan="1" rowspan="1"><p>activemq-admin query -QTopic=*.FOO -xQTo
 pic=ActiveMQ.Advisory.*</p></td><td colspan="1" rowspan="1"><p>Display all the attributes and object name information of all topics that ends with '.FOO' except those that also begins with 'ActiveMQ.Advisory.'.</p></td></tr><tr><td colspan="1" rowspan="1"><p>activemq-admin query -QBroker=local???? --view Type,BrokerName,EnqueueCount,DequeueCount</p></td><td colspan="1" rowspan="1"><p>Display the object type, broker name, enqueue count, and dequeue count information for all 9-letter brokers that begins with 'local'.</p></td></tr><tr><td colspan="1" rowspan="1"><p>activemq-admin query --objname Type=<strong>Connect</strong>,BrokerName=localhost -xQNetworkConnector=*</p></td><td colspan="1" rowspan="1"><p>Display all the attributes and object name information for all connections and connectors for broker 'localhost' except its network connectors.</p></td></tr><tr><td colspan="1" rowspan="1"><p>activemq-admin query --objname Type=Connection --xobjname Type=Connection,BrokerName=localhos
 t</p></td><td colspan="1" rowspan="1"><p>Display all the attributes and object name information for all registered connections except those belonging to broker 'localhost'.</p></td></tr><tr><td colspan="1" rowspan="1"><p>activemq-admin query -QQueue=???? --objname Type=Connection --xobjname BrokerName=remote*</p></td><td colspan="1" rowspan="1"><p>Display all the attributes and object name information for all 4-letter queues and connections except those belonging to a broker that begins with 'remote'.</p></td></tr></tbody></table><p><strong>ActiveMQ MBean Reference:</strong></p><table><tbody><tr><th colspan="1" rowspan="1"><p>Mbean Type</p></th><th colspan="1" rowspan="1"><p>Properties / ObjectName</p></th><th colspan="1" rowspan="1"><p>Attributes</p></th></tr><tr><td colspan="1" rowspan="1"><p>Broker</p></td><td colspan="1" rowspan="1"><ul><li><strong>Type</strong>=Broker</li><li><strong>BrokerName</strong>=&lt;broker identifier&gt;</li></ul></td><td colspan="1" rowspan="1"><ul><li
 >BrokerId</li><li>TotalEnqueueCount</li><li>TotalDequeueCount</li><li>TotalConsumerCount</li><li>TotalMessages</li><li>TotalMessagesCached</li><li>MemoryLimit</li><li>MemoryPercentageUsed</li></ul></td></tr><tr><td colspan="1" rowspan="1"><p>Destination</p></td><td colspan="1" rowspan="1"><ul><li><strong>Type</strong>=Queue|Topic</li><li><strong>Destination</strong>=&lt;destination identifier&gt;</li><li><strong>BrokerName</strong>=&lt;name of broker&gt;</li></ul></td><td colspan="1" rowspan="1"><ul><li>EnqueueCount</li><li>DequeueCount</li><li>ConsumerCount</li><li>Messages</li><li>MessagesCached</li></ul></td></tr><tr><td colspan="1" rowspan="1"><p>NetworkConnector</p></td><td colspan="1" rowspan="1"><ul><li><strong>Type</strong>=NetworkConnector</li><li><strong>BrokerName</strong>=&lt;connector identifierr&gt;</li></ul></td><td colspan="1" rowspan="1"><p>&#160;</p></td></tr><tr><td colspan="1" rowspan="1"><p>Connector</p></td><td colspan="1" rowspan="1"><ul><li><strong>Type</stro
 ng>=Connector</li><li><strong>ConnectorName</strong>=&lt;connector identifier&gt;</li><li><strong>BrokerName</strong>=&lt;name of broker&gt;</li></ul></td><td colspan="1" rowspan="1"><ul><li>EnqueueCount</li><li>DequeueCount</li></ul></td></tr><tr><td colspan="1" rowspan="1"><p>Connection</p></td><td colspan="1" rowspan="1"><ul><li><strong>Type</strong>=Connection</li><li><strong>Connection</strong>=&lt;connection identifier&gt;</li><li><strong>BrokerName</strong>=&lt;name of broker&gt;</li></ul></td><td colspan="1" rowspan="1"><ul><li>EnqueueCount</li><li>DequeueCount</li><li>DispatchQueueSize</li><li>Active</li><li>Blocked</li><li>Connected</li><li>Slow</li></ul></td></tr></tbody></table><p><structured-macro ac:macro-id="60c898c5-ba0d-43b2-83a5-cb91b4f8efaa" ac:name="anchor" ac:schema-version="1"><parameter ac:name="">bstat</parameter></structured-macro></p><h3>bstat task</h3><table><tbody><tr><th colspan="1" rowspan="1"><p>Task Name</p></th><td colspan="1" rowspan="1"><p>bstat</p
 ></td></tr><tr><th colspan="1" rowspan="1"><p>Task Usage</p></th><td colspan="1" rowspan="1"><p><em>activemq-admin bstat</em> [broker name]</p></td></tr><tr><th colspan="1" rowspan="1"><p>Description</p></th><td colspan="1" rowspan="1"><p>Predefined query script that displays useful statistics regarding a broker and its components.</p></td></tr></tbody></table><p><strong>Examples:</strong></p><table><tbody><tr><th colspan="1" rowspan="1"><p>Example</p></th><th colspan="1" rowspan="1"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1"><p>activemq-admin bstat</p></td><td colspan="1" rowspan="1"><p>Display useful statistics for all registered brokers in the default JMX context.</p></td></tr><tr><td colspan="1" rowspan="1"><p>activemq-admin bstat localhost</p></td><td colspan="1" rowspan="1"><p>Display useful statistics for the registered broker 'localhost'.</p></td></tr></tbody></table><p><structured-macro ac:macro-id="712ec0d8-e5e9-4c0f-9242-2058c7d53e58" ac:name="anchor" ac:
 schema-version="1"><parameter ac:name="">browse</parameter></structured-macro></p><h3>browse task</h3><table><tbody><tr><th colspan="1" rowspan="1"><p>Task Name</p></th><td colspan="1" rowspan="1"><p>browse</p></td></tr><tr><th colspan="1" rowspan="1"><p>Task Usage</p></th><td colspan="1" rowspan="1"><p><em>activemq-admin browse --amqurl &lt;broker url&gt; [options] &lt;destinations&gt;</em> or <em>java -jar run.jar browse --amqurl &lt;broker url&gt; [options] &lt;destinations&gt;</em></p></td></tr><tr><th colspan="1" rowspan="1"><p>Description</p></th><td colspan="1" rowspan="1"><p>Script to browse selected destinations' messages.&#160; The browse operation may not return all messages due to limitations of broker configuration and system resources.</p></td></tr></tbody></table><p><strong>Options:</strong></p><table><tbody><tr><th colspan="1" rowspan="1"><p>Option Name</p></th><th colspan="1" rowspan="1"><p>Syntax</p></th><th colspan="1" rowspan="1"><p>Example</p></th><th colspan="1
 " rowspan="1"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1"><p>Broker URL Option</p></td><td colspan="1" rowspan="1"><p>--amqurl &lt;url&gt;</p></td><td colspan="1" rowspan="1"><p>--amqurl tcp://localhost:61616</p></td><td colspan="1" rowspan="1"><p>Specify the broker URL to connect to.</p></td></tr><tr><td colspan="1" rowspan="1"><p>Message Selector Option</p></td><td colspan="1" rowspan="1"><p>--msgsel "&lt;msgsel1,msgsel2,...&gt;"</p></td><td colspan="1" rowspan="1"><p>--msgsel "JMSMessageID='*:10',JMSPriority&gt;5"</p></td><td colspan="1" rowspan="1"><p>Allows you to filter the specific messages to view. Place the entire selector criteria in double quotes " ". You can use wildcard queries by enclosing the string message property in ' '. Other than using wildcard queries to filter string properties, other queries follows the message selector format.</p></td></tr><tr><td colspan="1" rowspan="1"><p>Group View Option</p></td><td colspan="1" rowspan="1"><p>-V[header | c
 ustom | body]</p></td><td colspan="1" rowspan="1"><p>-Vheader, -Vcustom, -Vbody</p></td><td colspan="1" rowspan="1"><p>Let's you specify a specific group of message attributes to view. The header view shows all the standard JMS message headers. The custom view shows all the custom fields added to each JMS message. The body view shows the message body of the JMS message.</p></td></tr><tr><td colspan="1" rowspan="1"><p>Specific View Option</p></td><td colspan="1" rowspan="1"><p>--view &lt;attr1&gt;,[header:|custom:]&lt;attr2&gt;,...</p></td><td colspan="1" rowspan="1"><p>--view JMSMessageID='*:10',custom:MyCustomField</p></td><td colspan="1" rowspan="1"><p>Let's you specifically select a specific message attribute. It allows you to select specific attributes from the JMS and custom headers. You could add the tags header: and custom: to explicitly specify where the attribute belongs to. Refer to the message header table below for details.</p></td></tr><tr><td colspan="1" rowspan="1"><p
 >System Define Option</p></td><td colspan="1" rowspan="1"><p>-D&lt;key&gt;=&lt;value&gt;</p></td><td colspan="1" rowspan="1"><p>-Dactivemq.home=c:/ActiveMQ</p></td><td colspan="1" rowspan="1"><p>Sets a systems property. i.e Systems.getProperty("activemq.home"); will return c:/ActiveMQ</p></td></tr><tr><td colspan="1" rowspan="1"><p>Help Option</p></td><td colspan="1" rowspan="1"><p>-h or -? or --help</p></td><td colspan="1" rowspan="1"><p>--help</p></td><td colspan="1" rowspan="1"><p>Display the help messages for the browse script.</p></td></tr><tr><td colspan="1" rowspan="1"><p>Version Option</p></td><td colspan="1" rowspan="1"><p>--version</p></td><td colspan="1" rowspan="1"><p>activemq --version</p></td><td colspan="1" rowspan="1"><p>Display the activemq version information.</p></td></tr></tbody></table><p><strong>Examples:</strong></p><table><tbody><tr><th colspan="1" rowspan="1"><p>Example</p></th><th colspan="1" rowspan="1"><p>Description</p></th></tr><tr><td colspan="1" rowsp
 an="1"><p>activemq-admin browse --amqurl tcp://localhost:61616 TEST.FOO</p></td><td colspan="1" rowspan="1"><p>Prints the JMS message header, custom message header, and message body of the messages in the queue 'TEST.FOO'</p></td></tr><tr><td colspan="1" rowspan="1"><p>activemq-admin browse --amqurl tcp://localhost:61616 -Vheader,body TEST.FOO</p></td><td colspan="1" rowspan="1"><p>Prints the JMS message header and message body of the messages in the queue 'TEST.FOO'</p></td></tr><tr><td colspan="1" rowspan="1"><p>activemq-admin browse --amqurl tcp://localhost:61616 -Vheader --view custom:MyCustomField TEST.FOO TEST.BAR</p></td><td colspan="1" rowspan="1"><p>Prints all the JMS message header and the custom field 'MyCustomField' of the messages in the queue 'TEST.FOO' and 'TEST.BAR'.</p></td></tr><tr><td colspan="1" rowspan="1"><p>activemq-admin browse --amqurl tcp://localhost:61616 --msgsel "JMSMessageID='*:10',JMSPriority&gt;5" TEST.FOO</p></td><td colspan="1" rowspan="1"><p>Prints
  all the attributes of the messages in the queue 'TEST.FOO' that has a JMSMessageID that matches the wildcard query *:10 and has a JMSPriority greater than 5.</p></td></tr></tbody></table><p><strong>JMS Message Header Reference:</strong></p><table><tbody><tr><th colspan="1" rowspan="1"><p>Header Name</p></th><th colspan="1" rowspan="1"><p>Header Type</p></th></tr><tr><td colspan="1" rowspan="1"><p>JMSCorrelation ID</p></td><td colspan="1" rowspan="1"><p>String</p></td></tr><tr><td colspan="1" rowspan="1"><p>JMSDelivery Mode</p></td><td colspan="1" rowspan="1"><p>int (1-Non-Persistent, 2-Persistent)</p></td></tr><tr><td colspan="1" rowspan="1"><p>JMSDestination</p></td><td colspan="1" rowspan="1"><p>javax.jms.Destination</p></td></tr><tr><td colspan="1" rowspan="1"><p>JMSExpiration</p></td><td colspan="1" rowspan="1"><p>long</p></td></tr><tr><td colspan="1" rowspan="1"><p>JMSMessageID</p></td><td colspan="1" rowspan="1"><p>String</p></td></tr><tr><td colspan="1" rowspan="1"><p>JMSPri
 ority</p></td><td colspan="1" rowspan="1"><p>int</p></td></tr><tr><td colspan="1" rowspan="1"><p>JMSRedelivered</p></td><td colspan="1" rowspan="1"><p>boolean</p></td></tr><tr><td colspan="1" rowspan="1"><p>JMSReplyTo</p></td><td colspan="1" rowspan="1"><p>javax.jms.Destination</p></td></tr><tr><td colspan="1" rowspan="1"><p>JMSTimestamp</p></td><td colspan="1" rowspan="1"><p>long</p></td></tr><tr><td colspan="1" rowspan="1"><p>JMSType</p></td><td colspan="1" rowspan="1"><p>String</p></td></tr></tbody></table><p><structured-macro ac:macro-id="71ca7af0-8ada-4ab6-865a-a7084464aa65" ac:name="anchor" ac:schema-version="1"><parameter ac:name="">purge</parameter></structured-macro></p><h3>purge task</h3><table><tbody><tr><th colspan="1" rowspan="1"><p>Task Name</p></th><td colspan="1" rowspan="1"><p>purge</p></td></tr><tr><th colspan="1" rowspan="1"><p>Task Usage</p></th><td colspan="1" rowspan="1"><p><em>activemq-admin purge</em> [purge-options] &lt;destinations&gt;</p></td></tr><tr><th 
 colspan="1" rowspan="1"><p>Description</p></th><td colspan="1" rowspan="1"><p>Delete selected destination's messages that matches the message selector.</p></td></tr></tbody></table><p><strong>Options:</strong></p><table><tbody><tr><th colspan="1" rowspan="1"><p>Option Name</p></th><th colspan="1" rowspan="1"><p>Syntax</p></th><th colspan="1" rowspan="1"><p>Example</p></th><th colspan="1" rowspan="1"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1"><p>JMX URL Option</p></td><td colspan="1" rowspan="1"><p>--jmxurl &lt;url&gt;</p></td><td colspan="1" rowspan="1"><p>--jmxurl service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi</p></td><td colspan="1" rowspan="1"><p>Change the JMX service url to connect to. By default it connects to: service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi</p></td></tr><tr><td colspan="1" rowspan="1"><p>JMX Authentication Option</p></td><td colspan="1" rowspan="1"><p>--jmxuser user --jmxpassword password</p></td><td colspan="1" rowspan="1"><p>--jmxu
 ser smx --jmxpassword smx</p></td><td colspan="1" rowspan="1"><p>For cases where username/password based authentication of the JMX client is required. Not set by default.</p></td></tr><tr><td colspan="1" rowspan="1"><p>Message Selector Option</p></td><td colspan="1" rowspan="1"><p>--msgsel "&lt;msgsel1,msgsel2,...&gt;"</p></td><td colspan="1" rowspan="1"><p>--msgsel "JMSMessageID='*:10',JMSPriority&gt;5"</p></td><td colspan="1" rowspan="1"><p>Allows you to filter the specific messages to view. Place the entire selector criteria in double quotes " ". You can use wildcard queries by enclosing the string message property in ' '. Other than using wildcard queries to filter string properties, other queries follows the message selector format.</p></td></tr><tr><td colspan="1" rowspan="1"><p>System Define Option</p></td><td colspan="1" rowspan="1"><p>-D&lt;key&gt;=&lt;value&gt;</p></td><td colspan="1" rowspan="1"><p>-Dactivemq.home=c:/ActiveMQ</p></td><td colspan="1" rowspan="1"><p>Sets a 
 systems property. i.e Systems.getProperty("activemq.home"); will return c:/ActiveMQ</p></td></tr><tr><td colspan="1" rowspan="1"><p>Help Option</p></td><td colspan="1" rowspan="1"><p>-h or -? or --help</p></td><td colspan="1" rowspan="1"><p>--help</p></td><td colspan="1" rowspan="1"><p>Display the help messages for the browse script.</p></td></tr><tr><td colspan="1" rowspan="1"><p>Version Option</p></td><td colspan="1" rowspan="1"><p>--version</p></td><td colspan="1" rowspan="1"><p>activemq --version</p></td><td colspan="1" rowspan="1"><p>Display the activemq version information.</p></td></tr></tbody></table><p><strong>Examples:</strong></p><table><tbody><tr><th colspan="1" rowspan="1"><p>Example</p></th><th colspan="1" rowspan="1"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1"><p>activemq-admin purge FOO.BAR</p></td><td colspan="1" rowspan="1"><p>Delete all the messages in queue FOO.BAR</p></td></tr><tr><td colspan="1" rowspan="1"><p>activemq-admin purge --msgsel "JMSM
 essageID='*:10',JMSPriority&gt;5" FOO.*</p></td><td colspan="1" rowspan="1"><p>Delete all the messages in the destinations that matches FOO.* and has a JMSMessageID in", the header field that matches the wildcard *:10, and has a JMSPriority field &gt; 5 in the", queue FOO.BAR <br clear="none"> To use wildcard queries, the field must be a string and the query enclosed in ''</p></td></tr></tbody></table><h3>dstat task</h3><table><tbody><tr><th colspan="1" rowspan="1"><p>Task Name</p></th><td colspan="1" rowspan="1"><p>dstat</p></td></tr><tr><th colspan="1" rowspan="1"><p>Task Usage</p></th><td colspan="1" rowspan="1"><p><em>activemq-admin dstat</em> [destination type]</p></td></tr><tr><th colspan="1" rowspan="1"><p>Description</p></th><td colspan="1" rowspan="1"><p>Predefined query script that displays useful statistics regarding destinations on a broker.</p></td></tr></tbody></table><p><strong>Examples:</strong></p><table><tbody><tr><th colspan="1" rowspan="1"><p>Example</p></th><th 
 colspan="1" rowspan="1"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1"><p>activemq-admin dstat</p></td><td colspan="1" rowspan="1"><p>Display useful statistics for all destinations on the broker in the default JMX context.</p></td></tr><tr><td colspan="1" rowspan="1"><p>activemq-admin dstat topics</p></td><td colspan="1" rowspan="1"><p>Display useful statistics for the Topics that currently exist on the Broker.</p></td></tr></tbody></table></div>
 


Mime
View raw message