views:

1225

answers:

1

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  A: 

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.

ScottCher
So, the fail-over notification exception occurs when the primary server goes down... do you get another when the primary server reconnects or the backup takes over?
Anthony Mastrean
No, its one event. Once the backup server takes over, it becomes primary so unless another failover takes place, it will remain primary. Also, in a single server nonFT Env, we get the connection failure very quickly. In FT env, the failover msg appear seemingly after reconnection was successful.
ScottCher