conduktor.io ↗

Kafka BrokerHeartbeat Changelog — Protocol Version History

What is BrokerHeartbeat?

Each broker sends this periodically to the KRaft controller to prove liveness and report metadata replication progress. A broker that stops heartbeating gets fenced and its leadership migrated away. The highestMetadataOffset tells the controller how caught up the broker is before unfencing after a restart.

VersionKafkaChanges
BrokerHeartbeatRequest
v02.8
+ BrokerId int32
+ BrokerEpoch int64
+ CurrentMetadataOffset int64
+ WantFence bool
+ WantShutDown bool
~ Flexible encoding enabled FLEXIBLE
v13.7
+ OfflineLogDirs []uuid
adds the OfflineLogDirs flexible field
v2
+ CordonedLogDirs []uuid
adds the CordonedLogDirs flexible field
BrokerHeartbeatResponse
v02.8
+ ThrottleTimeMs int32
+ ErrorCode int16
+ IsCaughtUp bool
+ IsFenced bool
+ ShouldShutDown bool
~ Flexible encoding enabled FLEXIBLE
v13.7
is the same as version 0 (new field in request).
v2
is the same as version 0 (new field in request).