Broker 10.5 | webMethods Broker Documentation | webMethods Broker Client C API Programmer's Guide | Subscribing to and Receiving Events | Event Subscriptions | Cancelling a Subscription
 
Cancelling a Subscription
Your application may cancel an event subscription by calling the awCancelSubscription. The following example contains an excerpt from the subscribe1.c sample application that shows the use of the awCancelSubscription function. The function accepts these parameters:
*A BrokerClient handle.
*The event type name, which may optionally contain a wildcard at the end.
*The event filter string that was specified with the original specification. NULL may be specified if event filtering was not specified in the original subscription. Event filters are described in Managing Event Types.
. . .
BrokerClient c;
. . .
/* Cancel the subscription */
err = awCancelSubscription(c, "Sample::SimpleEvent", NULL);
if (err != AW_NO_ERROR) {
printf("Error on canceling subscription\n%s\n", awErrorToString(err));
return 0;
}
. . .