What is BrokerRegistration?
A broker sends this on startup in KRaft mode to register with the active controller. The incarnation UUID changes on every restart, letting the controller distinguish a restart from a slow broker and prevent two instances of the same broker ID from both being active.
| Version | Kafka | Changes |
|---|---|---|
| BrokerRegistrationRequest | ||
| v0 | 2.8 | + BrokerId int32+ ClusterId string+ IncarnationId uuid+ Listeners []Listener+ Name string+ Host string+ Port uint16+ SecurityProtocol int16+ Features []Feature+ Name string+ MinSupportedVersion int16+ MaxSupportedVersion int16+ Rack string~ Flexible encoding enabled FLEXIBLE |
| v1 | 3.4 | + IsMigratingZkBroker booladds Zk broker epoch to the request if the broker is migrating from Zk mode to KRaft mode. |
| v2 | 3.7 | + LogDirs []uuidadds LogDirs for KIP-858 |
| v3 | 3.7 | + PreviousBrokerEpoch int64adds the PreviousBrokerEpoch for the KIP-966 |
| v4 | 3.9 | fixes KAFKA-17011, which blocked SupportedFeatures.MinVersion in the response from being 0. |
| v5 | + CordonedLogDirs []uuidadds the CordonedLogDirs flexible field | |
| BrokerRegistrationResponse | ||
| v0 | 2.8 | + ThrottleTimeMs int32+ ErrorCode int16+ BrokerEpoch int64~ Flexible encoding enabled FLEXIBLE |
| v1 | 3.4 | adds Zk broker epoch to the request if the broker is migrating from Zk mode to KRaft mode. |
| v2 | 3.7 | adds the PreviousBrokerEpoch to the request for the KIP-966 |
| v3 | 3.7 | is the same as version 2 (new field in request). |
| v4 | 3.9 | is the same as version 2 (new field in request). |
| v5 | is the same as version 2 (new field in request). | |