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.
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
ListOffsetsRequest v11
ReplicaId
int32 · 4B
IsolationLevel
int8 · 1B
TimeoutMs
int32 · 4B
tagged
var
Name
string (compact)
tagged
var
PartitionIndex
int32 · 4B
CurrentLeaderEpoch
int32 · 4B
Timestamp
int64 · 8B
tagged
var
Schema & Example
Schema { "ReplicaId": int32, "IsolationLevel": int8, "Topics": [{ "Name": string, "Partitions": [{ "PartitionIndex": int32, "CurrentLeaderEpoch": int32, "Timestamp": int64 }] }], "TimeoutMs": int32 }
Example { "ReplicaId": -1, "IsolationLevel": 1, "Topics": [{ "Name": "orders", "Partitions": [{ "PartitionIndex": 3, "CurrentLeaderEpoch": 12, "Timestamp": 1711648200000 }] }], "TimeoutMs": 30000 }