conduktor.io ↗

Kafka Heartbeat Changelog — Protocol Version History

What is Heartbeat?

Classic-protocol consumers send this on a fixed interval to prove liveness to the group coordinator. Missing a heartbeat within session.timeout.ms kicks the member and triggers a rebalance, usually because consumers spend too long in poll() processing, starving the heartbeat thread.

VersionKafkaChanges
HeartbeatRequest
v02.2
+ GroupId string
+ GenerationId int32
+ MemberId string
v12.2
and version 2 are the same as version 0. Starting from version 3, we add a new field called groupInstanceId to indicate member identity across restarts.
v22.2No changes
v32.3
+ GroupInstanceId string
v42.4
~ Flexible encoding enabled FLEXIBLE
is the first flexible version.
HeartbeatResponse
v02.2
+ ErrorCode int16
v12.2
+ ThrottleTimeMs int32
adds throttle time.
v22.2
on quota violation, brokers send out responses before throttling. Starting from version 3, heartbeatRequest supports a new field called groupInstanceId to indicate member identity across restarts.
v32.3No changes
v42.4
~ Flexible encoding enabled FLEXIBLE
is the first flexible version.