Uploaded image for project: 'ActiveMQ Classic'
  1. ActiveMQ Classic
  2. AMQ-3222

Failover and SimpleDiscovery - query parameters getting dropped

    XMLWordPrintableJSON

Details

    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&amp;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

          Activity

            People

              gtully Gary Tully
              gtully Gary Tully
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: