Uploaded image for project: 'ActiveMQ C++ Client'
  1. ActiveMQ C++ Client
  2. AMQCPP-352

FailoverTransportFactory doesn't work correctly with more than two composite uris

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.0, 3.2.4
    • 3.2.5, 3.3.0
    • Transports
    • None
    • All platforms

    Description

      Only first and last composite uris are recognized by FailoverTransportFactory.

      For example - given uri:
      failover://(tcp://10.10.10.1:61616,tcp://10.10.10.2:61616,tcp://10.10.10.3:61616,tcp://10.10.10.4:61616)
      only "tcp://10.10.10.1:61616" and "tcp://10.10.10.4:61616" will work.

      The bug in URISupport::splitComponents().
      Line 350:
      std::string s = str.substr( last, i );
      should be replaced by:
      std::string s = str.substr( last, i - last ); // 2nd argument of substr() is length of substring

      Attachments

        Activity

          People

            tabish Timothy A. Bish
            dimba Dmitry Babich
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: