2.2. Discovery Protocol
Abstract
- discovery URI—looks up all of the discoverable brokers and presents them as a list of actual URIs for use by the client or network connector
- discovery agents—components that advertise the list of available brokers
2.2.1. Discovery URI
Abstract
Overview
URI syntax
Example 2.4. Discovery URI
discovery://(DiscoveryAgentUri)?Options
?Options
, are specified in the form of a query list. The discovery options are described in Table 2.3, “Dynamic Discovery Protocol Options”. You can also inject transport options as described in the section called “Setting options on the discovered transports”.
Transport options
Sample URI
Example 2.5. Discovery Protocol URI
discovery://(multicast://default)?initialReconnectDelay=100
Setting options on the discovered transports
connectionTimeout
option to 10 seconds.
Example 2.6. Injecting Transport Options into a Discovered Transport
discovery://(multicast://default)?connectionTimeout=10000
2.2.2. Discovery Agents
Abstract
transportConnector
element as shown in Example 2.7, “Enabling a Discovery Agent on a Broker”.
Example 2.7. Enabling a Discovery Agent on a Broker
<transportConnectors> <transportConnector name="openwire" uri="tcp://localhost:61716" discoveryUri="multicast://default" /> </transportConnectors>
discoveryUri
attribute on the transportConnector
element is initialized to multicast://default
.
2.2.2.1. Fuse Fabric Discovery Agent
Abstract
Overview
URI
Example 2.8. Fuse Fabric Discovery Agent URI Format
fabric://GID
Configuring a broker
Configuring a client
Example 2.9. Client Connection URL using Fuse Fabric Discovery
discovery://(fabric://nwBrokers)
nwBrokers
broker group and generate a list of brokers to which it can connect.
2.2.2.2. Static Discovery Agent
Abstract
Overview
Using the agent
Example 2.10. Static Discovery Agent URI Format
static://(URI1,URI2,URI3,...)
Example
Example 2.11. Discovery URI using the Static Discovery Agent
discovery://(static://(tcp://localhost:61716,tcp://localhost:61816))
2.2.2.3. Multicast Discovery Agent
Abstract
Overview
URI
Example 2.12. Multicast Discovery Agent URI Format
multicast://GroupID
Configuring a broker
transportConnector
element's discoveryUri
attribute to a mulitcast discovery agent URI as shown in Example 2.13, “Enabling a Multicast Discovery Agent on a Broker”.
Example 2.13. Enabling a Multicast Discovery Agent on a Broker
<transportConnectors> <transportConnector name="openwire" uri="tcp://localhost:61716" discoveryUri="multicast://default" /> </transportConnectors>
default
.
Configuring a client
Example 2.14. Client Connection URL using Multicast Discovery
discovery://(multicast://default)
default
multicast group and generate a list of brokers to which it can connect.
2.2.2.4. Zeroconf Discovery Agent
Abstract
Overview
URI
Example 2.15. Zeroconf Discovery Agent URI Format
zeroconf://GroupID
Configuring a broker
transportConnector
element's discoveryUri
attribute to a mulitcast discovery agent URI as shown in Example 2.16, “Enabling a Multicast Discovery Agent on a Broker”.
Example 2.16. Enabling a Multicast Discovery Agent on a Broker
<transportConnectors> <transportConnector name="openwire" uri="tcp://localhost:61716" discoveryUri="multicast://NEGroup" /> </transportConnectors>
NEGroup
.
Configuring a client
Example 2.17. Client Connection URL using Zeroconf Discovery
discovery://(zeroconf://NEGroup)
NEGroup
multicast group and generate a list of brokers to which it can connect.