A discovery protocol builds a connection to a message broker in two steps:
Obtain a list of available broker endpoints.
Connect to one or more endpoints from the discovered list, according to some selection algorithm.
Discovery protocols are particularly useful for clients that connect to a cluster of message brokers.
Table 2 describes the discovery protocols that clients can use.
Table 2. Summary of Discovery Protocols
| Protocol | Sample URL | Description |
|---|---|---|
| Failover | failover://(uri1,...,uriN)?TransportOptions | Configure clients to connect to one of the broker endpoints from the URI list,
uri1,...,uriN.
The transport options,
?TransportOptions, are specified in
the form of a query list. If no transport options are required, you can omit the
parentheses and the question mark, ?. For more information
see ????. |
| Discovery | discovery://( | Configure clients to connect to one of the broker endpoints from a URI list
that is dynamically discovered at runtime, using a discovery agent. The discovery
agent URI, DiscoveryAgentUri, is normally a multicast
discovery agent—for example, multicast://default. For more information
see ????. |
| Fanout | fanout://( | Configure clients to connect to all of the broker endpoints from a dynamically discovered URI list. For more information see ????. |
The discovery protocol supports a number of discovery agents, which are also specified in the form of a URI. For details of the supported discovery agents, see ????.
Note
Although discovery agent URIs look superficially like transport URIs, they are not the same thing. A discovery agent URI can only be used in certain contexts and cannot be used directly in place of a transport URI.








