conduktor.io ↗

Kafka FetchSnapshot Changelog — Protocol Version History

What is FetchSnapshot?

KRaft follower controllers or newly joining brokers download a point-in-time metadata snapshot when they've fallen too far behind to catch up via the log. After a long outage or when joining a mature cluster, a broker fetches the snapshot first, then applies incremental log entries.

VersionKafkaChanges
FetchSnapshotRequest
v02.8
+ ClusterId string
+ ReplicaId int32
+ MaxBytes int32
+ Topics []TopicSnapshot
+ Name string
+ Partitions []PartitionSnapshot
+ Partition int32
+ CurrentLeaderEpoch int32
+ SnapshotId SnapshotId
+ EndOffset int64
+ Epoch int32
+ Position int64
~ Flexible encoding enabled FLEXIBLE
v13.9
+ ReplicaDirectoryId uuid
adds replica directory id (KIP-853)
FetchSnapshotResponse
v02.8
+ ThrottleTimeMs int32
+ ErrorCode int16
+ Topics []TopicSnapshot
+ Name string
+ Partitions []PartitionSnapshot
+ Index int32
+ ErrorCode int16
+ SnapshotId SnapshotId
+ EndOffset int64
+ Epoch int32
+ CurrentLeader LeaderIdAndEpoch
+ LeaderId int32
+ LeaderEpoch int32
+ Size int64
+ Position int64
+ UnalignedRecords records
~ Flexible encoding enabled FLEXIBLE
v13.9
+ NodeEndpoints []NodeEndpoint
+ NodeId int32
+ Host string
+ Port uint16
adds leader endpoint (KIP-853)