conduktor.io ↗

Kafka TxnOffsetCommit Changelog — Protocol Version History

What is TxnOffsetCommit?

Stages an offset commit as part of a transaction. The offsets aren't visible to other consumers until the transaction commits. If the transaction aborts, the offsets roll back and the consumer will reprocess those records.

VersionKafkaChanges
TxnOffsetCommitRequest
v02.2
+ TransactionalId string
+ GroupId string
+ ProducerId int64
+ ProducerEpoch int16
+ Topics []TxnOffsetCommitRequestTopic
+ Name string
+ Partitions []TxnOffsetCommitRequestPartition
+ PartitionIndex int32
+ CommittedOffset int64
+ CommittedMetadata string
v12.2
is the same as version 0.
v22.2
+ CommittedLeaderEpoch int32
adds the committed leader epoch.
v32.5
+ GenerationId int32
+ MemberId string
+ GroupInstanceId string
~ Flexible encoding enabled FLEXIBLE
adds the member.id, group.instance.id and generation.id.
v43.8
adds support for new error code TRANSACTION_ABORTABLE (KIP-890).
v54.0
is the same as version 4 (KIP-890). Note when TxnOffsetCommit requests are used in transaction, if transaction V2 (KIP_890 part 2) is enabled, the TxnOffsetCommit request will also include the function for a AddOffsetsToTxn call. If V2 is disabled, the client can't use TxnOffsetCommit request version higher than 4 within a transaction.
TxnOffsetCommitResponse
v02.2
+ ThrottleTimeMs int32
+ Topics []TxnOffsetCommitResponseTopic
+ Name string
+ Partitions []TxnOffsetCommitResponsePartition
+ PartitionIndex int32
+ ErrorCode int16
v12.2
on quota violation, brokers send out responses before throttling.
v22.2
is the same as version 1.
v32.5
~ Flexible encoding enabled FLEXIBLE
adds illegal generation, fenced instance id, and unknown member id errors.
v43.8
adds support for new error code TRANSACTION_ABORTABLE (KIP-890).
v54.0
is the same with version 3 (KIP-890).