conduktor.io ↗

Kafka EndTxn Request Wire Format v0 — Binary Protocol Layout

What is EndTxn?

Commits or aborts a transaction (committed=true or false). If a producer crashes without calling EndTxn, the transaction coordinator aborts it after transaction.timeout.ms, blocking read_committed consumers on that partition until the abort marker is written.

Related Errors

CONCURRENT_TRANSACTIONS · COORDINATOR_LOAD_IN_PROGRESS · COORDINATOR_NOT_AVAILABLE · INVALID_PRODUCER_EPOCH · INVALID_PRODUCER_ID_MAPPING · INVALID_REGULAR_EXPRESSION · INVALID_REQUEST · INVALID_TRANSACTION_TIMEOUT · INVALID_TXN_STATE · KAFKA_STORAGE_ERROR · MESSAGE_TOO_LARGE · NOT_COORDINATOR · NOT_ENOUGH_REPLICAS · NOT_ENOUGH_REPLICAS_AFTER_APPEND · NOT_LEADER_OR_FOLLOWER · PRODUCER_FENCED · RECORD_LIST_TOO_LARGE · REQUEST_TIMED_OUT · TRANSACTIONAL_ID_AUTHORIZATION_FAILED · TRANSACTIONAL_ID_NOT_FOUND · TRANSACTION_ABORTABLE · UNKNOWN_SERVER_ERROR · UNKNOWN_TOPIC_OR_PARTITION · UNSUPPORTED_VERSION

Wire Diagram

Request Header
message_size int32 · 4B
api_key int16 · 2B
api_version int16 · 2B
correlation_id int32 · 4B
client_id string
EndTxnRequest v0
TransactionalId string
ProducerId int64 · 8B
ProducerEpoch int16 · 2B
Committed bool · 1B

Schema & Example

Schema
{
  "TransactionalId": string,
  "ProducerId": int64,
  "ProducerEpoch": int16,
  "Committed": bool
}
Example
{
  "TransactionalId": "tx-orders-001",
  "ProducerId": 0,
  "ProducerEpoch": 12,
  "Committed": true
}