Broker 10.15 | webMethods Broker Documentation | webMethods Broker Client Java API Programmer's Guide | Load Balancing and Failover for Publish Operations | Publishing and Delivering Events | Delivering Multiple Events
 
Delivering Multiple Events
The following example shows the use of the BrokerClusterPublisher.deliver method to deliver a single event. This method accepts these parameters:
*A string containing the destination identifier (client identifier of the recipient).
*An array of BrokerEvents to be delivered.
The following example illustrates how to deliver multiple events:
. . .
BrokerClusterPublisher bcp;
BrokerEvent e, event;
String dest_id = "DestClient";
. . .
/* create a BrokerClusterPublisher */
. . .
/* create an array of events to be sent and set the event fields */
. . .
/* Deliver events to the recipient */
try {
bcp.deliver( dest_id, e);
} catch (BrokerException ex) {
System.out.println("Error on delivering events\n"+ex);
return;
}
. . .