When a backup server assumes the role of the primary server during failover, clients attempt to reconnect to the backup server (that is, the new primary). To enable a client to reconnect, you must specify the URLs of both servers. Specify multiple servers as a comma-separated list of URLs. Both URLs must use the same protocol (either tcp
or ssl
).
In the following examples, the first server is tcp://server0:7222
, and the second server is tcp://server1:7344
(if first server is not available).
Java clients can list the primary and backup server URLs in the serverURL
argument to a TibjmsConnectionFactory
constructor. For example:
TibjmsTopicConnectionFactory factory = new TibjmsTopicConnectionFactory( "tcp://server0:7222, tcp://server1:7344");
Java clients can use the Java Administrator API to specify the primary and backup server URLs in the url
argument to a ConnectionFactoryInfo
constructor. For example:
ConnectionFactoryInfo cfi = new ConnectionFactoryInfo( "ssl://server0:7222, ssl://server1:7344, ssl://server2:7222", null, QUEUE_TYPE, params );
C clients list the primary and backup server URLs in the brokerURL
argument to a connection constructor. For example:
When creating a connection factory using tibemsadmin
, an administrator can specify multiple server URLs in the url
argument of the create factory
command. For example:
Even though there are only two servers (the primary and backup servers), clients can specify more than two URLs for the connection. For example, if each server has more than one listen address, a client can reconnect to the same server at a different address (that is, at a different network interface). In another example, clients can configure to failover to parallel remote servers for catastrophe recovery.
TIBCO Enterprise Message Service™ User’s Guide Software Release 4.3, February 2006 Copyright © TIBCO Software Inc. All rights reserved www.tibco.com |