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.
Wire Diagram
Request Header · flexible
message_size
int32 · 4B
api_key
int16 · 2B
api_version
int16 · 2B
correlation_id
int32 · 4B
client_id
string (compact)
tagged
var
BrokerRegistrationRequest v1
BrokerId
int32 · 4B
ClusterId
string (compact)
IncarnationId
uuid · 16B
Rack?
string (compact)
IsMigratingZkBroker
bool · 1B
tagged
var
Name
string (compact)
Host
string (compact)
Port
uint16 · 2B
SecurityProtocol
int16 · 2B
tagged
var
Name
string (compact)
MinSupportedVersion
int16 · 2B
MaxSupportedVersion
int16 · 2B
tagged
var
Schema & Example
Schema { "BrokerId": int32, "ClusterId": string, "IncarnationId": uuid, "Listeners": [{ "Name": string, "Host": string, "Port": uint16, "SecurityProtocol": int16 }], "Features": [{ "Name": string, "MinSupportedVersion": int16, "MaxSupportedVersion": int16 }], "Rack": string?, "IsMigratingZkBroker": bool }
Example { "BrokerId": 1, "ClusterId": "dQw4w9WgXcQ", "IncarnationId": "550e8400-e29b-41d4-a716-446655440000", "Listeners": [{ "Name": "orders", "Host": "broker-1.kafka.local", "Port": 9092, "SecurityProtocol": 1 }], "Features": [{ "Name": "orders", "MinSupportedVersion": 1, "MaxSupportedVersion": 1 }], "Rack": null, "IsMigratingZkBroker": true }