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.
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 v10
RequireStable
bool · 1B
tagged
var
GroupId
string (compact)
MemberId?
string (compact)
MemberEpoch
int32 · 4B
tagged
var
TopicId
uuid · 16B
PartitionIndexes
[]int32
tagged
var
Schema & Example
Schema { "Groups": [{ "GroupId": string, "MemberId": string?, "MemberEpoch": int32, "Topics": [{ "TopicId": uuid, "PartitionIndexes": [int32] }]? }], "RequireStable": bool }
Example { "Groups": [{ "GroupId": "order-processors", "MemberId": "consumer-1-abc123", "MemberEpoch": 12, "Topics": [{ "TopicId": "550e8400-e29b-41d4-a716-446655440000", "PartitionIndexes": [1, 2, 3] }]? }], "RequireStable": true }