additional support for dynamic uri's in FailoverTransport
---------------------------------------------------------

                 Key: AMQ-2807
                 URL: https://issues.apache.org/activemq/browse/AMQ-2807
             Project: ActiveMQ
          Issue Type: Improvement
          Components: Transport
    Affects Versions: 5.4.0
            Reporter: Kevan Miller
             Fix For: 5.4.0


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?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to