Broker 10.5 | webMethods Broker Documentation | webMethods Broker Client Java API Programmer's Guide | Load Balancing and Failover for Publish Operations | Using BrokerClusterPublisher | Disconnecting a BrokerClusterPublisher
 
Disconnecting a BrokerClusterPublisher
You can disconnect your BrokerClusterPublisher by calling the BrokerClusterPublisher .disconnect method as shown in the following example. If the application Broker client's life-cycle is destroy-on-disconnect the client state and the event queue storage will be destroyed by the Broker. If it is explicit-destroy, the client state and event queue storage will be preserved until the Broker clients reconnect.
. . .
BrokerClusterPublisher bcp;
. . .
/* Disconnect */
try {
bcp.disconnect();
} catch (BrokerException ex) {
System.out.println("Error on disconnect\n"+ex);
return;
}
. . .