Broker 10.5 | webMethods Broker Documentation | webMethods Broker Client C API Programmer's Guide | Publishing and Delivering Events | Publishing Events | Publishing Multiple Events
Publishing Multiple Events
You application may publish several events with one call to the awPublishEvents function. The following example shows the use of the awPublishEvents function to publish multiple events. The function accepts these parameters:
*A BrokerClient handle.
*A long containing the number of events in the array.
*A BrokerEvent array.
. . .
BrokerClient c;
BrokerEvent e[5];
. . .
/* Create and initialize the event array */
. . .
err = awPublishEvents(c, 5, e);
if (err != AW_NO_ERROR) {
printf("Error on publish events\n%s\n", awErrorToString(err));
return 0;
. . .
The awPublishEventsWithAck method can be used by your Broker client to publish one or more events while, at the same time, acknowledging the receipt of one or more events. For more information on event acknowledgement, see Using Sequence Numbers.