Broker 10.5 | webMethods Broker Documentation | webMethods Broker Client Java API Programmer's Guide | Load Balancing and Failover for Publish Operations | Broker Cluster Publisher Selection Notification | Defining a Selection Callback Object
Defining a Selection Callback Object
Use the BrokerCPSelectionCallbackinterface to derive your own callback object. Your implementation must provide an implementation of the chooseClusterClient method. This method passes-in the list of available Brokers in the form of an array of BrokerInfo objects-a list of Brokers to which a valid Broker client exists in the Broker cluster publisher pool along with the event(s) to be published/delivered. Your algorithm can examine the list of Brokers and the event(s) and choose an index from the BrokerInfo array that represents the Broker client connection you want to use for the current operation. With this index, BrokerClusterPublisher uses the specified Broker client from the Broker cluster publisher pool and executes the operation on that client connection.