conduktor.io ↗

Kafka WriteTxnMarkers Request Wire Format v1 — Binary Protocol Layout

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.

Related Errors

COORDINATOR_LOAD_IN_PROGRESS · COORDINATOR_NOT_AVAILABLE · CORRUPT_MESSAGE · INVALID_PRODUCER_EPOCH · INVALID_REGULAR_EXPRESSION · INVALID_REQUIRED_ACKS · KAFKA_STORAGE_ERROR · MESSAGE_TOO_LARGE · NOT_COORDINATOR · NOT_ENOUGH_REPLICAS · NOT_ENOUGH_REPLICAS_AFTER_APPEND · NOT_LEADER_OR_FOLLOWER · RECORD_LIST_TOO_LARGE · REQUEST_TIMED_OUT · TRANSACTION_COORDINATOR_FENCED · UNKNOWN_SERVER_ERROR · UNKNOWN_TOPIC_OR_PARTITION · UNSUPPORTED_FOR_MESSAGE_FORMAT · UNSUPPORTED_VERSION

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 v1
Markers array
tagged var
ProducerId int64 · 8B
ProducerEpoch int16 · 2B
TransactionResult bool · 1B
Topics array
CoordinatorEpoch int32 · 4B
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
  }]
}
Example
{
  "Markers": [{
      "ProducerId": 0,
      "ProducerEpoch": 12,
      "TransactionResult": true,
      "Topics": [{
          "Name": "orders",
          "PartitionIndexes": [1, 2, 3]
      }],
      "CoordinatorEpoch": 12
  }]
}