blob: 641ffb3d11eb086e4efe058a69695febc1ed1816 [file] [log] [blame]
<div class="wiki-content maincontent"><h2>Broker URI</h2>
<p>The Broker URI allows you to <link><page ri:content-title="Run Broker"></page><link-body>run a configured broker</link-body></link> using a single URI for all the configuration.</p>
<h4>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>Broker Options</h5>
<table><tbody><tr><th colspan="1" rowspan="1"><p>Option Name</p></th><th colspan="1" rowspan="1"><p>Default Value</p></th><th colspan="1" rowspan="1"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1"><p>useJmx</p></td><td colspan="1" rowspan="1"><p>true</p></td><td colspan="1" rowspan="1"><p>Should the broker be exposed to JMX?</p></td></tr><tr><td colspan="1" rowspan="1"><p>persistent</p></td><td colspan="1" rowspan="1"><p>true</p></td><td colspan="1" rowspan="1"><p>Should the broker use persistent storage</p></td></tr><tr><td colspan="1" rowspan="1"><p>populateJMSXUserID</p></td><td colspan="1" rowspan="1"><p>false</p></td><td colspan="1" rowspan="1"><p>Should the broker populate the <link><page ri:content-title="JMSXUserID"></page></link> property of messages to indicate the authenticated sender username who sent the message</p></td></tr><tr><td colspan="1" rowspan="1"><p>useShutdownHook</p></td><td colspan="1" rowspan="1"><p>true</p></td><td colspan="1" rowspan="1"><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"><p>brokerName</p></td><td colspan="1" rowspan="1"><p>localhost</p></td><td colspan="1" rowspan="1"><p>The name of the broker</p></td></tr><tr><td colspan="1" rowspan="1"><p>deleteAllMessagesOnStartup</p></td><td colspan="1" rowspan="1"><p>false</p></td><td colspan="1" rowspan="1"><p>Should all the messages in the persistent store be deleted on broker startup</p></td></tr><tr><td colspan="1" rowspan="1"><p>enableStatistics</p></td><td colspan="1" rowspan="1"><p>true</p></td><td colspan="1" rowspan="1"><p>Should statistics gathering be enabled</p></td></tr></tbody></table>
<h5>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>
<structured-macro ac:macro-id="35981ad4-c2b0-4fcf-bb9e-612ecd03d351" ac:name="noformat" ac:schema-version="1"><plain-text-body>
broker:(tcp://localhost:61616,network:static:tcp://remotehost:61616)?persistent=false&amp;useJmx=true
</plain-text-body></structured-macro>
<structured-macro ac:macro-id="b7bfcf5a-8d17-471e-a907-133785ea5950" ac:name="info" ac:schema-version="1"><parameter ac:name="title">You can use the Broker URI on other transports</parameter><rich-text-body>
<p>If you are using another transport - such as the <link><page ri:content-title="VM Transport Reference"></page></link> 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></rich-text-body></structured-macro></div>