2
votes

The TIBCO EMS .NET reference guide says (pg 134)

To enable reconnection behavior and fault tolerance, the serverURL parameter must be a comma-separated list of two or more URLs. In a situation with only one server, you may supply two copies of that server’s URL to enable client reconnection (for example, tcp://localhost:7222,tcp://localhost:7222).

The TIBCO EMS user's guide (pg 292) talks about failover scenarios, client notification, and automatic transfer of clients to the backup server, but nothing specifically "reconnect" related.

In a "reconnect" scenario, does the server handle everything? or does the client have to do something with it's TIBCO.EMS.Connection instances?

1
Wow, that's very interesting. In my testing, I didn't think there was a way to enable fault tolerance in a single server environment. I'll have to give this a try.ScottCher
That was the key - built-in reconnect didn't work because we were testing in a single-server environment and apparently, it requires a failover environment to work. Thanks so much!ScottCher
Added info: While the EMS library is in reconnect mode, I tried publishing to that connection. Instead of throwing an exception, that publish requested lock the app until reconnect was successful and then sent the message. I expect an exception if reconnect fails all attempts.ScottCher

1 Answers

4
votes

Looks like from our testing that the there are settings on both the server and the client that enable this feature. On the client side, the SetReconnAttemptCount, Delay, Timeout govern the attempts the client tries to reconnect once its aware of a server failover / connection failover.

In our testing, we used a single server environment, listed the server twice in the connection string (using the trick you outlined above) and when that server was taken offline, we received a client notification of the failover process taking affect (we enabled Tibems.SetExceptionOnFTSwitch(true)) and when the server was brought back online, our client seemlessly reconnected without missing a beat. We didn't need to code anything, the internal reconnect logic worked its magic.

On the server side, fault tolerance needs to be enabled and I believe server-client and client-server heartbeats need to be enabled (though this has not yet been verified).

Hope this helps.