conduktor.io ↗

Kafka AddRaftVoter Request Wire Format v1 — Binary Protocol Layout

What is AddRaftVoter?

Expands the KRaft controller quorum by adding a new voter node. The new node must catch up with the leader before participating in elections. Expanding from 3 to 5 voters increases fault tolerance from losing 1 node to losing 2.

Related Errors

DUPLICATE_VOTER · INVALID_VOTER_KEY

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
AddRaftVoterRequest v1
ClusterId? string (compact)
TimeoutMs int32 · 4B
VoterId int32 · 4B
VoterDirectoryId uuid · 16B
Listeners array
AckWhenCommitted bool · 1B
tagged var
Name string (compact)
Host string (compact)
Port uint16 · 2B
tagged var

Schema & Example

Schema
{
  "ClusterId": string?,
  "TimeoutMs": int32,
  "VoterId": int32,
  "VoterDirectoryId": uuid,
  "Listeners": [{
      "Name": string,
      "Host": string,
      "Port": uint16
  }],
  "AckWhenCommitted": bool
}
Example
{
  "ClusterId": "dQw4w9WgXcQ",
  "TimeoutMs": 30000,
  "VoterId": 1,
  "VoterDirectoryId": "550e8400-e29b-41d4-a716-446655440000",
  "Listeners": [{
      "Name": "orders",
      "Host": "broker-1.kafka.local",
      "Port": 9092
  }],
  "AckWhenCommitted": true
}