blob: c4b4a4617418490cae89c511c189d2f19f3f8449 [file] [log] [blame]
<div class="wiki-content maincontent"><h2 id="BrokerURI-BrokerURI">Broker URI</h2>
<p>The Broker URI allows you to <a shape="rect" href="run-broker.html">run a configured broker</a> using a single URI for all the configuration.</p>
<h4 id="BrokerURI-Syntax">Syntax</h4>
<p>The URI is assumed to be a composite uri with multiple uris that are used to bind the connectors of the broker.</p>
<p><strong>broker:(transportURI,network:networkURI)/brokerName?brokerOptions</strong></p>
<p>If a composite URI use the network: scheme, then the rest of the URI is bound as a network connector.</p>
<h5 id="BrokerURI-BrokerOptions">Broker Options</h5>
<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>Default Value</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>useJmx</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>true</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Should the broker be exposed to JMX?</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>persistent</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>true</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Should the broker use persistent storage</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>populateJMSXUserID</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>false</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Should the broker populate the <a shape="rect" href="jmsxuserid.html">JMSXUserID</a> property of messages to indicate the authenticated sender username who sent the message</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>useShutdownHook</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>true</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>should the broker install a shutdown hook so that it can properly shut itself down on a JVM kill</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>brokerName</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>localhost</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The name of the broker</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>deleteAllMessagesOnStartup</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>false</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Should all the messages in the persistent store be deleted on broker startup</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>enableStatistics</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>true</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Should statistics gathering be enabled</p></td></tr></tbody></table></div>
<h5 id="BrokerURI-ExampleURI">Example URI</h5>
<p>The following example starts up a broker accepting connections on port 61616, and establishes a network connection to remotehost:61616 and disables persistence.</p>
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
<pre>broker:(tcp://localhost:61616,network:static:tcp://remotehost:61616)?persistent=false&amp;useJmx=true
</pre>
</div></div>
<div class="confluence-information-macro confluence-information-macro-information"><p class="title">You can use the Broker URI on other transports</p><span class="aui-icon aui-icon-small aui-iconfont-info confluence-information-macro-icon"></span><div class="confluence-information-macro-body">
<p>If you are using another transport - such as the <a shape="rect" href="vm-transport-reference.html">VM Transport Reference</a> then you can refer to the above broker URI properties inside that URL. e.g. using the URL</p>
<p>vm://localhost?broker.persistent=false</p></div></div></div>