conduktor.io ↗

Kafka ListOffsets Request Wire Format v3 — Binary Protocol Layout

What is ListOffsets?

Resolves earliest, latest, or timestamp-based offsets, and powers the lag computation in kafka-consumer-groups.sh. Timestamp-based lookups map to the largest offset whose timestamp is <= the given value, which is how you rewind to a point in time after an incident.

Related Errors

INVALID_TOPIC_EXCEPTION · LEADER_NOT_AVAILABLE · OFFSET_NOT_AVAILABLE · OFFSET_OUT_OF_RANGE · TOPIC_AUTHORIZATION_FAILED · UNKNOWN_TOPIC_OR_PARTITION

Wire Diagram

Request Header
message_size int32 · 4B
api_key int16 · 2B
api_version int16 · 2B
correlation_id int32 · 4B
client_id string
ListOffsetsRequest v3
ReplicaId int32 · 4B
IsolationLevel int8 · 1B
Topics array
Name string
Partitions array
PartitionIndex int32 · 4B
Timestamp int64 · 8B

Schema & Example

Schema
{
  "ReplicaId": int32,
  "IsolationLevel": int8,
  "Topics": [{
      "Name": string,
      "Partitions": [{
          "PartitionIndex": int32,
          "Timestamp": int64
      }]
  }]
}
Example
{
  "ReplicaId": -1,
  "IsolationLevel": 1,
  "Topics": [{
      "Name": "orders",
      "Partitions": [{
          "PartitionIndex": 3,
          "Timestamp": 1711648200000
      }]
  }]
}