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. |
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. |