What is OffsetCommit?
Every consumer sends this after processing records to checkpoint its position into __consumer_offsets. Commit failures during rebalances (REBALANCE_IN_PROGRESS, ILLEGAL_GENERATION) are the root cause of duplicate processing in at-least-once consumers.
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
OffsetCommitRequest v9
GroupId
string (compact)
GenerationIdOrMemberEpoch
int32 · 4B
MemberId
string (compact)
GroupInstanceId?
string (compact)
tagged
var
Name
string (compact)
tagged
var
PartitionIndex
int32 · 4B
CommittedOffset
int64 · 8B
CommittedLeaderEpoch
int32 · 4B
CommittedMetadata?
string (compact)
tagged
var
Schema & Example
Schema { "GroupId": string, "GenerationIdOrMemberEpoch": int32, "MemberId": string, "GroupInstanceId": string?, "Topics": [{ "Name": string, "Partitions": [{ "PartitionIndex": int32, "CommittedOffset": int64, "CommittedLeaderEpoch": int32, "CommittedMetadata": string? }] }] }
Example { "GroupId": "order-processors", "GenerationIdOrMemberEpoch": 12, "MemberId": "consumer-1-abc123", "GroupInstanceId": null, "Topics": [{ "Name": "orders", "Partitions": [{ "PartitionIndex": 3, "CommittedOffset": 150382, "CommittedLeaderEpoch": 12, "CommittedMetadata": "" }] }] }