- From the book
- Discovery
- is a process of detecting remote broker services.
- Clients usually want to discover all available brokers.
- Brokers usually want to find other available brokers so that they can establish a network of brokers.
This document is a little bit old, because it was using maven 1.
- Discovery Agents
- ActiveMQ uses an abstraction called a Discovery Agent to detect remote services such as remote brokers. We can use discovery for JMS clients to auto-detect a Message Broker to connect to, or to provide Networks of Brokers
- Two kinds of discovery agent
- Multicast
- Zeroconfig
- LDAP Discovery
- Trying out discovery
Apache ActiveMQ ™ -- Discovery Transport Reference
- The Discovery transport works just like the Failover transport, except that it uses a discovery agent to locate the list of uri to connect to.
- The Discovery transport is also used by the Fanout transport for discovering brokers to send a fanout message to.
- Note that to be able to use Discovery to find brokers, the brokers need to have the multicast discovery agent enabled on the broker.
- <transportConnector … discoveryUri=”multicast://default” />
- discovery:(discoveryAgentURI)?transportOptions
- discovery:discoveryAgentURI
- Example URI:
- discovery:(multicast://default)?initialReconnnectDelay=100
Transport Options
Option Name | Default Value | Description |
---|---|---|
reconnectDelay | 10 | How long to wait for discovery |
initialReconnectDelay | 10 | How long to wait before the first reconnect attempt to a discovered url |
maxReconnectDelay | 30000 | The maximum amount of time we ever wait between reconnect attempts |
useExponentialBackOff | true | Should an exponential backoff be used btween reconnect attempts |
backOffMultiplier | 2 | The exponent used in the exponential backoff attempts |
maxReconnectAttempts | 0 | If not 0, then this is the maximum number of reconnect attempts before an error is sent back to the client |
group | default | an identifier for the group to partition multi cast traffic among collaborating peers; the group forms part of the shared identity of a discovery datagram (since 5.2) |
No comments:
Post a Comment