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

additional support for dynamic uri's in FailoverTransport

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 5.4.0
    • 5.4.0
    • Transport
    • None

    Description

      In some environments, would be very convenient to allow dynamic addition of transport uri's to a FailoverTransport. This is currently supported for a network of brokers, but this doesn't help in certain scenarios.

      Here's one scenario that I'm interested in: a shared-storage master-slave configuration of brokers, with multiple clients. Since only one master broker is active at a time (and the master is not aware of the other slave brokers), it cannot communicate new broker url transports to connected clients. If clients must use tcp/ip protocols (i.e. multicast/discovery isn't an option), then there's no way for a client to dynamically "learn" when new brokers have been deployed. You must update the client's configuration and restart all connections with an updated list of transport uri's.

      I have a patch which will allow FailoverTransport to read new transport uri's from a file. The file is only read during doReconnect() processing. So, new processing is only driven when client has lost a connection/is establishing a new connection.

      To use the new feature, use a failover uri like the following:

      failover:(tcp://localhost:61616,tcp://localhost:61626)?updateURIsFile=/YourListOf/TransportUris

      or even

      failover)?updateURIsFile=/YourListOf/TransportUris

      Where the file contents would look like this:

      tcp://localhost:61616,tcp://localhost:61626

      If a new broker is added to your configuration, just append a new transport uri to that file.

      Patch includes a new test which tests this new feature – FailoverUpdateURIsTest.java.

      Comments?

      Attachments

        1. AMQ-2807.patch
          9 kB
          Kevan Lee Miller

        Activity

          People

            rajdavies Robert Davies
            kevan Kevan Lee Miller
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: