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.
Wire Diagram
Request Header · flexible
message_size
int32 · 4B
api_key
int16 · 2B
api_version
int16 · 2B
correlation_id
int32 · 4B
client_id
string (compact)
tagged
var
AddPartitionsToTxnRequest v3
V3AndBelowTransactionalId
string (compact)
V3AndBelowProducerId
int64 · 8B
V3AndBelowProducerEpoch
int16 · 2B
tagged
var
Name
string (compact)
Partitions
[]int32
tagged
var
Schema & Example
Schema { "V3AndBelowTransactionalId": string, "V3AndBelowProducerId": int64, "V3AndBelowProducerEpoch": int16, "V3AndBelowTopics": [{ "Name": string, "Partitions": [int32] }] }
Example { "V3AndBelowTransactionalId": "abc-123", "V3AndBelowProducerId": 0, "V3AndBelowProducerEpoch": 12, "V3AndBelowTopics": [{ "Name": "orders", "Partitions": [1, 2, 3] }] }