Broker 10.15 | webMethods Broker Documentation | webMethods Broker Client C API Programmer's Guide | API Reference | awDeliver | awDeliverEventsWithAck
 
awDeliverEventsWithAck
BrokerError awDeliverEventsWithAck(
BrokerClient client,
char *dest_id,
int n,
BrokerEvent *events,
int ack_type,
int n_acks,
BrokerLong *ack_seqn);
client
The Broker client that wishes to publish the events.
dest_id
The identifier of the Broker client to which the events are to be delivered.
n
The number of events in the events array.
events
The array of events to be delivered.
ack_type
Determines how the events will be acknowledged and must be set to one of the following:
*AW_ACK_NONE
*AW_ACK_AUTOMATIC
*AW_ACK_THROUGH
*AW_ACK_SELECTIVE
n_acks
The number of sequence numbers in ack_seqn.
ack_seqn
The array of sequence numbers to be acknowledged if ack_type is set to AW_ACK_THROUGH or AW_ACK_SELECTIVE.
Sends the array of events to the Broker for delivery to the Broker client destination specified by dest_id. You also have one of several options for acknowledging events already received by this client. Either all events or none will be delivered.
Note:
An error will not be returned if the recipient, represented by dest_id, no longer exists.
The setting of the ack_type and ack_seqn parameters will determine which events received by this client are to be acknowledged.
ack_type
ack_seqn
Result
AW_ACK_NONE
Not applicable.
No events are acknowledged.
AW_ACK_AUTOMATIC
Not applicable.
All events received by the client are acknowledged.
AW_ACK_THROUGH
ack_seqn[0] contains the sequence number of the last event to be acknowledged. If set to 0, the behavior will be the same as AW_ACK_AUTOMATIC
Acknowledges all events up to and including the sequence number specified by ack_seqn[0]. If the n_acks argument is zero, no events will be acknowledged.
AW_ACK_SELECTIVE
ack_seqn contains the sequence numbers of the specific events to be acknowledged.
Acknowledges the specific events whose sequence number are contained in ack_seqn. The n_acks argument must specify the number of sequence numbers contained in ack_seqn. All sequence numbers must be greater than zero.
Possible BrokerError major codes
Meaning
AW_ERROR_INVALID_ACKNOWLEDGEMENT
The parameter ack_seqn contained an invalid sequence number. The events were not sent to the Broker.
AW_ERROR_INVALID_CLIENT
The client is not valid.
AW_ERROR_INVALID_CLIENT_ID
The dest_id contains invalid characters.
AW_ERROR_INVALID_EVENT
One of the events contained in events is invalid.
AW_ERROR_NO_PERMISSION
The client does not have permission to publish all of the event types.
AW_ERROR_NULL_PARAM
The parameter events or dest_id is NULL.
AW_ERROR_OUT_OF_RANGE
The parameter n is less than zero.
AW_ERROR_UNKNOWN_EVENT_TYPE
The event type does not exist on the Broker.
See also: