Broker 10.5 | webMethods Broker Documentation | webMethods Broker Client C API Programmer's Guide | Using Request-Reply | The Server | Processing Request Events
Processing Request Events
Your server application has all of the usual options for receiving and processing events. It can use the awGetEvent function to receive events within a manually coded loop, described in Using Request-Reply. If your server subscribes to several request event types, it can use the callback model described in Using the Callback Model.
The server application may also associate an identifier with each of the subscriptions that it registers. When an event is received, the server application can easily determine how to process the request event. See Subscription Identifiers for more information.
The following example below shows an excerpt of a server application that uses the awGetEvent function to receive an event and determines if it is a request event:
. . .
/* Loop getting events */
n = 1;
while(n < count) {
err = awGetEvent(c,AW_INFINITE,&e);
if (err != AW_NO_ERROR) {
printf("Error on awGetEvent\n"); return 0;

/* Check if it is a request */
event_type_name = awGetEventTypeName(e);
if ((event_type_name != NULL) &&
(strcmp(event_type_name,"Sample::Request")==0)) {
/* Process the request (see excerpts that follow) */
. . .
. . .