1 Reply Latest reply on Mar 16, 2011 1:43 PM by Gary Tully

    failover transportoptions

    satya b Newbie

      May be simple problem but I can not get it to work .. documentation about failover says

      transportoptions implying I can supply more than one transport option. But the combinations I have tried does not work for me.

       

      I want to simply pass maxReconnectDelay and timeout as parameters. Is it possible at all?

       

      Syntax as explained in documentation

       

      failover:(uri1,...,uriN)?transportOptions

      or

      failover:uri1,...,uriN

       

      Examples I have tried

       

       

       

      Only when I pass either timeout or maxReconnectDelay does it work.

       

      Does any one else know about this. Thanks.

        • 1. Re: failover transportoptions
          Gary Tully Novice

          URI query parameters in ActiveMQ use the http form content type.

          So the parameters begin with the '?' (indicating the start of a query) and attribute values are separated from each other using '&'.

          In xml, html, xhtml, because '&' is a reserved character, it needs to be replaced with its corresponding entity reference: '&'.

          This is the case in ActiveMQ xml configuration. For example when two parameters are supplied in uri attribute, the entity reference is used as a separator

          <networkConnector uri="static:(failover:(tcp://localhost:32258,tcp://localhost:32259)?randomize=false&amp;maxReconnectAttempts=1)"/>

          When parsing or adding query parameters to URI, ActiveMQ does not respect ';' as a separator.

           

          Your failover URI should look like

          failover:(tcp://11.111.11.111:61618)?timeout=1000&amp;maxReconnectDelay"