Broker 10.5 | webMethods Broker Documentation | webMethods Broker Client C API Programmer's Guide | API Reference | awRegister | awRegisterCallbackForSubId
BrokerError awRegisterCallbackForSubId(
BrokerClient client,
int sub_id,
BrokerCallback func,
void *client_data);
The Broker client for which the callback is being registered.
The specific subscription ID of the events to be handled.
The callback function to be called to handle the event. See Defining a Callback Function.
A pointer to user-defined data that will be passed to the callback function when it is invoked.
Registers a specific callback func to process events with the specified sub_id that are received by client. When an event with the specified subscription ID is received for client, the callback function func will be invoked to process that event and will be passed client_data as a parameter. The content and use of client_data is determined by you the caller; it is not examined or used in any way by the Broker system.
You must register a general callback object, using the awRegisterCallback function, before calling this function.
If a callback function has already been registered for sub_id, the previous callback registration will be replaced with the new registration.
When using this function, make sure that each of the Broker client's event subscriptions uses a unique subscription ID if you want the events to be processed by different callback functions. Use non unique subscription IDs if you want multiple event types to be processed by the same callback function.
Possible BrokerError major codes
No general callback has been registered.
The client has been destroyed or disconnected.
The func is NULL.
The sub_id parameter is less zero.
See also: