conduktor.io ↗

Kafka UpdateRaftVoter Request Wire Format v0 — Binary Protocol Layout

What is UpdateRaftVoter?

Updates a KRaft controller node's listener endpoints in the quorum configuration after it migrates to a new host. Without this, other voters keep trying to reach the old address, which can cause the quorum to lose majority if the unreachable node is a voter.

Related Errors

INVALID_VOTER_KEY · VOTER_NOT_FOUND

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
UpdateRaftVoterRequest v0
ClusterId? string (compact)
CurrentLeaderEpoch int32 · 4B
VoterId int32 · 4B
VoterDirectoryId uuid · 16B
Listeners array
KRaftVersionFeature struct
tagged var
Name string (compact)
Host string (compact)
Port uint16 · 2B
tagged var
MinSupportedVersion int16 · 2B
MaxSupportedVersion int16 · 2B
tagged var

Schema & Example

Schema
{
  "ClusterId": string?,
  "CurrentLeaderEpoch": int32,
  "VoterId": int32,
  "VoterDirectoryId": uuid,
  "Listeners": [{
      "Name": string,
      "Host": string,
      "Port": uint16
  }],
  "KRaftVersionFeature": {
    "MinSupportedVersion": int16,
    "MaxSupportedVersion": int16
  }
}
Example
{
  "ClusterId": "dQw4w9WgXcQ",
  "CurrentLeaderEpoch": 12,
  "VoterId": 1,
  "VoterDirectoryId": "550e8400-e29b-41d4-a716-446655440000",
  "Listeners": [{
      "Name": "orders",
      "Host": "broker-1.kafka.local",
      "Port": 9092
  }],
  "KRaftVersionFeature": {
    "MinSupportedVersion": 1,
    "MaxSupportedVersion": 1
  }
}