The multicast discovery agent uses the IP multicast protocol to find any message brokers currently active on the local network. The agent requires that each broker you want to advertise is configured to use the multicast agent to publish its details to a multicast group. Clients using the multicast agent as part of the discovery URI they use for connecting to a broker will use the agent to receive the list of available brokers advertising in the specified multicast group.
![]() | Important |
---|---|
Your local network (LAN) must be configured appropriately for the IP/multicast protocol to work. |
The multicast discovery agent URI conforms to the syntax in Example 2.7.
Where GroupID
is an alphanumeric identifier. All
participants in the same discovery network must use the same
GroupID
.
For a broker to be discoverable using the multicast discovery agent, you must enable
the discovery agent in the broker's configuration. To enable the multicast discovery agent
you set the transportConnector
element's
discoveryUri
attribute to a mulitcast discovery agent URI as
shown in Example 2.8.
Example 2.8. Enabling a Multicast Discovery Agent on a Broker
<transportConnectors> <transportConnector name="openwire" uri="tcp://localhost:61716" discoveryUri="multicast://default" /> </transportConnectors>
The broker configured in Example 2.8 is
discoverable as part of the multicast group default
.
To use the agent a client must be configured to connect to a broker using a discovery protocol that uses a multicast agent URI as shown in Example 2.9.
A client using the URL in Example 2.9 will
discover all the brokers advertised in the default
multicast group and generate
a list of brokers to which it can connect.