Broker 10.5 | webMethods Broker Documentation | webMethods Broker Messaging Programmer's Guide | webMethods Messaging Publisher Reconnect | Enabling Publisher Reconnect | Set the Connection Order
 
Set the Connection Order
You can specify the failover logic to be either random or sequential. The default ordering is RANDOM so the system will randomly choose a Broker Server from the Broker Server list. If you specify SEQUENTIAL for the connection factory property, the system will attempt to connect to another Broker Server starting with the first one in the list.
*JMS Messaging
To set the connection order, use the following method.
public void setBrokerListOrder(String brokerListOrder) throws JMSException;
The following example shows how to set the Broker list order to SEQUENTIAL for JMS.
In this example, the Broker list order is set SEQUENTIAL, causing the system to connect to the next Broker Server in the list.
((WmConnectionFactoryImpl)tcf1).setBrokerListOrder("SEQUENTIAL");
*C# Messaging
To set the connection order, use the following method.
public interface IConnectionFactory {
String BrokerListOrder
{
set;
get;
}
The following example shows how to set the Broker list order to SEQUENTIAL for C#.
cf.BrokerListOrder = "SEQUENTIAL";