blob: 0a926e81ac97791e03285e0073cf71497d00f6af [file] [log] [blame]
<div class="wiki-content maincontent"><p>By default, the <a shape="rect" href="xml-configuration.html">ActiveMQ xml configuration</a> includes the <a shape="rect" href="discovery.html">multicast discovery</a> mechanism. The tcp transport connector advertises its self using multicast and a multicast network connector is configured to listen to the same address. In this way, all brokers that share the default multicast address will automatically network with each other. <br clear="none"> If multicast is not required, the multicast attributes of the Transport Connector and Network Connector can be removed.</p><p>To stop advertising your connection URI on the multicast network remove the discoveryUri attribute from the &lt;transportConnector/&gt;:</p><p>replace:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">&lt;transportConnector name="openwire" uri="tcp://localhost:61616" discoveryUri="multicast://default"/&gt;
</pre>
</div></div><p>with:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">&lt;transportConnector name="openwire" uri="tcp://localhost:61616" /&gt;
</pre>
</div></div><p>If you do not require any networked broker support remove the &lt;networkConnector/&gt; altogether. Remove</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">&lt;networkConnector name="default-nc" uri="multicast://default"/&gt;
</pre>
</div></div><p>Alternatively, provide a static networkConnector for each broker you wish to network with by replacing the the discoveryUri with the static transport connection URI of your target broker.</p><p>For more information see the <a shape="rect" href="discovery-transport-reference.html">Discovery Transport Reference</a></p></div>