Broker 10.5 | webMethods Broker Documentation | webMethods Broker Client C API Programmer's Guide | Subscribing to and Receiving Events | Event Subscriptions | Subscribing to Events
 
Subscribing to Events
 
Uniqueness of Subscriptions
Your application may subscribe to an event by calling the awNewSubscription function. The following example contains an excerpt from the subscribe1.c sample application that shows the use of the awNewSubscription function. The function accepts these parameters:
*A BrokerClient handle.
*An event type name.
*An event filter string or NULL if event filtering is not desired. Filters are described in Managing Event Types.
. . .
BrokerClient c;
. . .
/* Make a subscription */
err = awNewSubscription(c, "Sample::SimpleEvent", NULL);
if (err != AW_NO_ERROR) {
printf("Error on create subscription\n%s\n", awErrorToString(err));
return 0;
}
. . .