Broker 10.15 | webMethods Broker Documentation | webMethods Broker Client C API Programmer's Guide | API Reference | awTx | awTxPublishEventsWithAck
 
awTxPublishEventsWithAck
BrokerError awTxPublishEventsWithAck(
BrokerTxClient txclient,
int n,
BrokerEvent *events,
int ack_type,
int n_acks,
BrokerLong *ack_seqn);
txclient
The Broker client to transactionally publish the events.
n
The number of events in the events array.
events
The array of events to be published.
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 publication with one of several options for acknowledging events already received by this txclient. Either all events or none will be published.
Note:
This function can fail if the Broker client does not have permission to publish this event type, based on its client group, or if the event is not properly formed. See awTxCanPublish for more information.
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 numbers are contained in ack_seqn. The n_acks parameter 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 txclient is not valid.
AW_ERROR_INVALID_EVENT
One of the events in events is not valid or the event does not match its type definition.
AW_ERROR_NO_PERMISSION
The txclient does not have permission to publish all of the event types.
AW_ERROR_NULL_PARAM
The parameter events 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: