Broker 10.5 | webMethods Broker Documentation | webMethods Broker Client C API Programmer's Guide | Using the Callback Model | Understanding Callbacks | Defining a Callback Function
 
Defining a Callback Function
All callback functions that you register must use the following function prototype:
BrokerBoolean <your_function_name_goes_here>(
BrokerClient client,
BrokerEvent event,
void *client_data);
Value
Description
client
The client for which the event has been received.
event
The event that is being dispatched to this function.
client_data
A pointer to any data that you wish to be passed to this function when it is invoked.
Your function should return 1 (true) if its processing was successful or 0 (false) if a failure occurred. If 1 (true) is returned, the event will be acknowledged automatically. For information on acknowledging events, see Using Sequence Numbers.
Important:
Any event that is passed to a callback function will be automatically deleted after the callback returns. Your callback function should not call awDeleteEvent. If you wish to save a copy of the event, your callback must use the awCopyEvent function.