Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
5.4.2
Description
Using failover with static discovery makes sense in a master slave scenario.
With simple static discovery with a pair of uri's,
<networkConnector uri="static:(tcp://localhost:32258,tcp://localhost:32259)" />
static discovery will continue to try and connect to both uris which leads to repeated logging of failed attempts to bridge to the slave that is not active yet.
Using failover
<networkConnector uri="static:(failover:(tcp://localhost:32258,tcp://localhost:32259)?randomize=false&maxReconnectAttempts=1)"/>
improves on this as the failover: transport will be content with just one uri, from the broker perspective there is a single network bridge, rather than two.
Currently query parameter are not correctly applied.
Query parameter parsing is problematic when options for a transport are duplicated by the discovery mechanism, e.g: maxReconnectAttempts. There have been some related efforts to resolve this, https://issues.apache.org/jira/browse/AMQ-2981 and https://issues.apache.org/jira/browse/AMQ-2598. Parameters are stripped from transport uris and applied to both the transport and the discovery mechanism.
The end result, and fix, is that additional transport options that need to be applied to discovered transport (which typically have all query parameters removed) need to be isolated from normal query parameters using a dot (prefixed with "discovered.") notation. e.g:
discovery:(multicast://default)?initialReconnectDelay=100&discovered.closeAsync=false"
Attachments
Issue Links
- is related to
-
AMQ-3707 Dynamic Failover Client Connection Params Broker Side Attribute
- Resolved