Broker 10.5 | webMethods Broker Documentation | webMethods Broker Client C API Programmer's Guide | API Reference | awTx | awTxGetEventsWithAck
BrokerError awTxGetEventsWithAck(
BrokerTxClient txclient,
int max_events,
BrokerLong seqn,
int msecs,
int *n,
BrokerEvent **events);
The Broker client requesting the events.
The maximum number of events to be returned.
Specifies the last event to acknowledge. If set to zero, all previously received events that have not been acknowledged will be acknowledged. If set to -1, no acknowledgment is done at all.
The number of milliseconds to wait for the events before timing out. If set to AW_INFINITE, this function will wait indefinitely.
The number of events returned. This parameter is used for output.
An array of events. This parameter is used for output.
Acknowledges all the events received by txclient, up to the event specified by seqn and then obtains one or more events. If seqn is set to -1, no previously retrieved events will be acknowledged.
The events that are obtained may be those for which the client has registered a subscription, they may be delivered events, or both.
Calling awTxGetEventsWithAck on a client that has registered callback functions will temporarily disable the callback mechanism for that client until this function returns. For more information on acknowledging events see Using Sequence Numbers. If the wait time expires, this function returns a BrokerError with a major code of AW_ERROR_TIMEOUT and n set to zero.
The caller is responsible for calling awDeleteEvent on each event and then for calling free on the array itself.
The Broker will delete all guaranteed events from the event queue once they are acknowledged.
Possible BrokerError major codes
The awInterruptGetEvents function was invoked.
The client has been destroyed or disconnected.
The n or events is NULL.
The msecs parameter is less than -1 or max_events is less than zero.
The msecs time-out interval expired before any events arrived.
See also: