conduktor.io ↗

Kafka ListOffsets Response Wire Format v10 — 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

Response Header · flexible
message_size int32 · 4B
correlation_id int32 · 4B
tagged var
ListOffsetsResponse v10
ThrottleTimeMs int32 · 4B
Topics array
tagged var
Name string (compact)
Partitions array
tagged var
PartitionIndex int32 · 4B
ErrorCode int16 · 2B
Timestamp int64 · 8B
Offset int64 · 8B
LeaderEpoch int32 · 4B
tagged var

Schema & Example

Schema
{
  "ThrottleTimeMs": int32,
  "Topics": [{
      "Name": string,
      "Partitions": [{
          "PartitionIndex": int32,
          "ErrorCode": int16,
          "Timestamp": int64,
          "Offset": int64,
          "LeaderEpoch": int32
      }]
  }]
}
Example
{
  "ThrottleTimeMs": 0,
  "Topics": [{
      "Name": "orders",
      "Partitions": [{
          "PartitionIndex": 3,
          "ErrorCode": 0,
          "Timestamp": 1711648200000,
          "Offset": 284729,
          "LeaderEpoch": 17
      }]
  }]
}