conduktor.io ↗

Kafka Produce Response Wire Format v7 — Binary Protocol Layout

What is Produce?

Every producer sends this for every message publish, making it the dominant write path. With acks=all, the broker waits for all ISR replicas to acknowledge before responding; acks=1 returns after the leader writes locally; acks=0 is fire-and-forget with no loss detection.

Related Errors

CORRUPT_MESSAGE · DUPLICATE_SEQUENCE_NUMBER · INVALID_PRODUCER_EPOCH · INVALID_RECORD · INVALID_REQUIRED_ACKS · INVALID_TIMESTAMP · INVALID_TXN_STATE · LEADER_NOT_AVAILABLE · MESSAGE_TOO_LARGE · NETWORK_EXCEPTION · NOT_ENOUGH_REPLICAS · NOT_ENOUGH_REPLICAS_AFTER_APPEND · NOT_LEADER_OR_FOLLOWER · OUT_OF_ORDER_SEQUENCE_NUMBER · RECORD_LIST_TOO_LARGE · THROTTLING_QUOTA_EXCEEDED · TOPIC_AUTHORIZATION_FAILED · TRANSACTIONAL_ID_AUTHORIZATION_FAILED · TRANSACTION_COORDINATOR_FENCED · UNKNOWN_PRODUCER_ID · UNKNOWN_TOPIC_ID · UNKNOWN_TOPIC_OR_PARTITION · UNSUPPORTED_FOR_MESSAGE_FORMAT

Wire Diagram

Response Header
message_size int32 · 4B
correlation_id int32 · 4B
ProduceResponse v7
Responses array
ThrottleTimeMs int32 · 4B
Name string
PartitionResponses array
Index int32 · 4B
ErrorCode int16 · 2B
BaseOffset int64 · 8B
LogAppendTimeMs int64 · 8B
LogStartOffset int64 · 8B

Schema & Example

Schema
{
  "Responses": [{
      "Name": string,
      "PartitionResponses": [{
          "Index": int32,
          "ErrorCode": int16,
          "BaseOffset": int64,
          "LogAppendTimeMs": int64,
          "LogStartOffset": int64
      }]
  }],
  "ThrottleTimeMs": int32
}
Example
{
  "Responses": [{
      "Name": "orders",
      "PartitionResponses": [{
          "Index": 3,
          "ErrorCode": 0,
          "BaseOffset": 284729,
          "LogAppendTimeMs": 1711648200000,
          "LogStartOffset": 284729
      }]
  }],
  "ThrottleTimeMs": 0
}