conduktor.io ↗

Kafka OffsetFetch Request Wire Format v7 — Binary Protocol Layout

What is OffsetFetch?

Consumers call this on startup or after a rebalance to recover their last committed position, and kafka-consumer-groups.sh --describe uses it to show lag. Returns UNKNOWN_TOPIC_OR_PARTITION if the group never committed to a partition, meaning auto.offset.reset applies.

Related Errors

COORDINATOR_NOT_AVAILABLE · GROUP_AUTHORIZATION_FAILED · INVALID_GROUP_ID · NOT_COORDINATOR · TOPIC_AUTHORIZATION_FAILED · UNKNOWN_TOPIC_ID · UNSTABLE_OFFSET_COMMIT

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
OffsetFetchRequest v7
GroupId string (compact)
Topics? array
RequireStable bool · 1B
tagged var
Name string (compact)
PartitionIndexes []int32
tagged var

Schema & Example

Schema
{
  "GroupId": string,
  "Topics": [{
      "Name": string,
      "PartitionIndexes": [int32]
  }]?,
  "RequireStable": bool
}
Example
{
  "GroupId": "order-processors",
  "Topics": [{
      "Name": "orders",
      "PartitionIndexes": [1, 2, 3]
  }]?,
  "RequireStable": true
}