conduktor.io ↗

Kafka AddPartitionsToTxn Changelog — Protocol Version History

What is AddPartitionsToTxn?

Transactional producers send this before writing to any new partition within a transaction to register it with the coordinator. CONCURRENT_TRANSACTIONS means another producer with the same transactional.id is still active and must complete or time out first.

VersionKafkaChanges
AddPartitionsToTxnRequest
v02.2
+ Name string
+ Partitions []int32
+ V3AndBelowTransactionalId string
+ V3AndBelowProducerId int64
+ V3AndBelowProducerEpoch int16
+ V3AndBelowTopics []AddPartitionsToTxnTopic
+ Name string
+ Partitions []int32
v12.2
is the same as version 0.
v22.7
adds the support for new error code PRODUCER_FENCED.
v32.8
~ Flexible encoding enabled FLEXIBLE
and below will be exclusively used by clients and versions 4 and above will be used by brokers.
v43.5
+ Transactions []AddPartitionsToTxnTransaction
+ TransactionalId string
+ ProducerId int64
+ ProducerEpoch int16
+ VerifyOnly bool
+ Topics []AddPartitionsToTxnTopic
- V3AndBelowTransactionalId string
- V3AndBelowProducerId int64
- V3AndBelowProducerEpoch int16
- V3AndBelowTopics []AddPartitionsToTxnTopic
adds VerifyOnly field to check if partitions are already in transaction and adds support to batch multiple transactions.
v53.8
adds support for new error code TRANSACTION_ABORTABLE (KIP-890).
AddPartitionsToTxnResponse
v02.2
+ ThrottleTimeMs int32
+ Name string
+ ResultsByPartition []AddPartitionsToTxnPartitionResult
+ PartitionIndex int32
+ PartitionErrorCode int16
+ ResultsByTopicV3AndBelow []AddPartitionsToTxnTopicResult
+ Name string
+ ResultsByPartition []AddPartitionsToTxnPartitionResult
+ PartitionIndex int32
+ PartitionErrorCode int16
v12.2
on quota violation brokers send out responses before throttling.
v22.7
adds the support for new error code PRODUCER_FENCED.
v32.8
~ Flexible encoding enabled FLEXIBLE
enables flexible versions.
v43.5
+ ErrorCode int16
+ ResultsByTransaction []AddPartitionsToTxnResult
+ TransactionalId string
+ TopicResults []AddPartitionsToTxnTopicResult
- ResultsByTopicV3AndBelow []AddPartitionsToTxnTopicResult
adds support to batch multiple transactions and a top level error code.
v53.8
adds support for new error code TRANSACTION_ABORTABLE (KIP-890).