What is WriteTxnMarkers?
After EndTxn, the transaction coordinator sends this internally (never user code) to write COMMIT or ABORT markers to every partition in the transaction. Consumers in read_committed mode are unblocked partition-by-partition as markers arrive, so a slow partition can delay consumption even if all others are done.
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
WriteTxnMarkersRequest v2
tagged
var
ProducerId
int64 · 8B
ProducerEpoch
int16 · 2B
TransactionResult
bool · 1B
CoordinatorEpoch
int32 · 4B
TransactionVersion
int8 · 1B
tagged
var
Name
string (compact)
PartitionIndexes
[]int32
tagged
var
Schema & Example
Schema { "Markers": [{ "ProducerId": int64, "ProducerEpoch": int16, "TransactionResult": bool, "Topics": [{ "Name": string, "PartitionIndexes": [int32] }], "CoordinatorEpoch": int32, "TransactionVersion": int8 }] }
Example { "Markers": [{ "ProducerId": 0, "ProducerEpoch": 12, "TransactionResult": true, "Topics": [{ "Name": "orders", "PartitionIndexes": [1, 2, 3] }], "CoordinatorEpoch": 12, "TransactionVersion": 1 }] }