blob: 25d37d6fbd9748bf759bee9845a90dddc2738b39 [file] [log] [blame]
<div class="wiki-content maincontent"><h3>The Multicast Transport</h3>
<p>The Multicast transport allows clients to connect to a remote ActiveMQ broker using multicast</p>
<p>Note that by default Multicast is not reliable; datagrams can be lost so you should add a reliability layer to ensure the JMS contract can be implemented on a non-reliable transport.</p>
<h4>Configuration Syntax</h4>
<p><strong>multicast://address:port?transportOptions</strong></p>
<h5>Transport 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> group </p></td><td colspan="1" rowspan="1"><p> default </p></td><td colspan="1" rowspan="1"><p> specify a unique group name that can segregate multicast traffic</p></td></tr><tr><td colspan="1" rowspan="1"><p> minmumWireFormatVersion </p></td><td colspan="1" rowspan="1"><p> 0 </p></td><td colspan="1" rowspan="1"><p> The minimum version wireformat that is allowed </p></td></tr><tr><td colspan="1" rowspan="1"><p> trace </p></td><td colspan="1" rowspan="1"><p> false </p></td><td colspan="1" rowspan="1"><p> Causes all commands that are sent over the transport to be logged </p></td></tr><tr><td colspan="1" rowspan="1"><p> useLocalHost </p></td><td colspan="1" rowspan="1"><p> true </p></td><td colspan="1" rowspan="1"><p> When true, it causes the local machines name to resolve to "localhost". </p></td></tr><tr><td colspan="1" rowspan="1"><p> datagramSize </p></td><td colspan="1" rowspan="1"><p> 4 * 1024 </p></td><td colspan="1" rowspan="1"><p> Specifies the size of a datagram </p></td></tr><tr><td colspan="1" rowspan="1"><p> timeToLive </p></td><td colspan="1" rowspan="1"><p> -1 </p></td><td colspan="1" rowspan="1"><p> The time to live of datagrams. Set greater than 1 to send packets beyond the local network. (<strong>NOTE:</strong> This won't work for IPv4 addresses without setting the property <code>java.net.preferIPv4Stack=true</code>. For more info see the <a shape="rect" href="http://java.sun.com/j2se/1.5.0/docs/guide/net/ipv6_guide/index.html">IPv6 User Guide for JDK</a>) </p></td></tr><tr><td colspan="1" rowspan="1"><p> loopBackMode </p></td><td colspan="1" rowspan="1"><p> false </p></td><td colspan="1" rowspan="1"><p> Should loopback mode be used </p></td></tr><tr><td colspan="1" rowspan="1"><p> wireFormat </p></td><td colspan="1" rowspan="1"><p> default </p></td><td colspan="1" rowspan="1"><p> The name of the WireFormat to use </p></td></tr><tr><td colspan="1" rowspan="1"><p> wireFormat.* </p></td><td colspan="1" rowspan="1"><p>&#160;</p></td><td colspan="1" rowspan="1"><p> All the properties with this prefix are used to configure the wireFormat. See <link><page ri:content-title="Configuring Wire Formats"></page></link> for more information </p></td></tr></tbody></table>
<h5>Example URIs</h5>
<p>To use the default value of "multicast://239.255.2.3:6155" with a default multicast group name of "default" from <a shape="rect" href="http://activemq.apache.org/maven/apidocs/org/apache/activemq/transport/discovery/multicast/MulticastDiscoveryAgent.html#DEFAULT_DISCOVERY_URI_STRING">MulticastDiscoveryAgent</a> use</p>
<structured-macro ac:macro-id="beb72716-5581-4aa8-aa3b-b4ba539bc46b" ac:name="noformat" ac:schema-version="1"><plain-text-body>
multicast://default
</plain-text-body></structured-macro>
<p>To specify the IP address and port use</p>
<structured-macro ac:macro-id="337fa52e-2268-47df-8144-af7d474ee78a" ac:name="noformat" ac:schema-version="1"><plain-text-body>
multicast://224.1.2.3:6255
</plain-text-body></structured-macro>
<p>To specify a multicast group name other than the default name of "default" use</p>
<structured-macro ac:macro-id="5c85602f-728c-4657-b2c5-a1e3bd745860" ac:name="noformat" ac:schema-version="1"><plain-text-body>
multicast://224.1.2.3:6255?group=mygroupname
</plain-text-body></structured-macro></div>