What is AddOffsetsToTxn?
Enrolls an offset commit in the current transaction for exactly-once consume-transform-produce. If the transaction aborts, both the produced records and the offset commit are rolled back atomically.
| Version | Kafka | Changes |
|---|---|---|
| AddOffsetsToTxnRequest | ||
| v0 | 2.2 | + TransactionalId string+ ProducerId int64+ ProducerEpoch int16+ GroupId string |
| v1 | 2.2 | is the same as version 0. |
| v2 | 2.7 | adds the support for new error code PRODUCER_FENCED. |
| v3 | 2.8 | ~ Flexible encoding enabled FLEXIBLE enables flexible versions. |
| v4 | 3.8 | adds support for new error code TRANSACTION_ABORTABLE (KIP-890). |
| AddOffsetsToTxnResponse | ||
| v0 | 2.2 | + ThrottleTimeMs int32+ ErrorCode int16 |
| v1 | 2.2 | on quota violation brokers send out responses before throttling. |
| v2 | 2.7 | adds the support for new error code PRODUCER_FENCED. |
| v3 | 2.8 | ~ Flexible encoding enabled FLEXIBLE enables flexible versions. |
| v4 | 3.8 | adds support for new error code TRANSACTION_ABORTABLE (KIP-890). |