conduktor.io ↗

Kafka OffsetFetch Changelog — Protocol Version History

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.

VersionKafkaChanges
OffsetFetchRequest
v12.2
the broker supports fetching offsets from the internal __consumer_offsets topic.
v22.2
~ Topics became nullable
the request can contain a null topics array to indicate that offsets for all topics should be fetched. It also returns a top level error code for group or coordinator level errors.
v32.2
4, and 5 are the same as version 2.
v42.2No changes
v52.2No changes
v62.4
~ Flexible encoding enabled FLEXIBLE
is the first flexible version.
v72.5
+ RequireStable bool
is adding the require stable flag.
v83.0
+ Groups []OffsetFetchRequestGroup
+ GroupId string
+ Topics []OffsetFetchRequestTopics
+ Name string
+ PartitionIndexes []int32
- GroupId string
- Topics []OffsetFetchRequestTopic
- Name string
- PartitionIndexes []int32
is adding support for fetching offsets for multiple groups at a time.
v93.7
+ MemberId string
+ MemberEpoch int32
is the first version that can be used with the new consumer group protocol (KIP-848). It adds the MemberId and MemberEpoch fields. Those are filled in and validated when the new consumer protocol is used.
v104.1
+ TopicId uuid
- Name string
adds support for topic ids and removes support for topic names (KIP-848).
OffsetFetchResponse
v12.2
is the same as version 0.
v22.2
+ ErrorCode int16
adds a top-level error code.
v32.2
+ ThrottleTimeMs int32
adds the throttle time.
v42.2
on quota violation, brokers send out responses before throttling.
v52.2
+ CommittedLeaderEpoch int32
adds the leader epoch to the committed offset.
v62.4
~ Flexible encoding enabled FLEXIBLE
is the first flexible version.
v72.5
adds pending offset commit as new error response on partition level.
v83.0
+ Groups []OffsetFetchResponseGroup
+ GroupId string
+ Topics []OffsetFetchResponseTopics
+ Name string
+ Partitions []OffsetFetchResponsePartitions
+ PartitionIndex int32
+ CommittedOffset int64
+ CommittedLeaderEpoch int32
+ Metadata string
+ ErrorCode int16
+ ErrorCode int16
- Topics []OffsetFetchResponseTopic
- Name string
- Partitions []OffsetFetchResponsePartition
- PartitionIndex int32
- CommittedOffset int64
- CommittedLeaderEpoch int32
- Metadata string
- ErrorCode int16
- ErrorCode int16
is adding support for fetching offsets for multiple groups
v93.7
is the first version that can be used with the new consumer group protocol (KIP-848). The response is the same as version 8 but can return STALE_MEMBER_EPOCH and UNKNOWN_MEMBER_ID errors when the new consumer group protocol is used.
v104.1
+ TopicId uuid
- Name string
adds support for topic ids and removes support for topic names (KIP-848).