conduktor.io ↗

Kafka Vote Request Wire Format v1 — Binary Protocol Layout

What is Vote?

A candidate KRaft controller sends this to other quorum voters to request a vote during leader election. High Vote request rates in controller logs indicate quorum instability, possibly from network partitions or GC pauses causing missed heartbeats.

Related Errors

INCONSISTENT_VOTER_SET · 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
VoteRequest v1
ClusterId? string (compact)
VoterId int32 · 4B
Topics array
tagged var
TopicName string (compact)
Partitions array
tagged var
PartitionIndex int32 · 4B
ReplicaEpoch int32 · 4B
ReplicaId int32 · 4B
ReplicaDirectoryId uuid · 16B
VoterDirectoryId uuid · 16B
LastOffsetEpoch int32 · 4B
LastOffset int64 · 8B
tagged var

Schema & Example

Schema
{
  "ClusterId": string?,
  "VoterId": int32,
  "Topics": [{
      "TopicName": string,
      "Partitions": [{
          "PartitionIndex": int32,
          "ReplicaEpoch": int32,
          "ReplicaId": int32,
          "ReplicaDirectoryId": uuid,
          "VoterDirectoryId": uuid,
          "LastOffsetEpoch": int32,
          "LastOffset": int64
      }]
  }]
}
Example
{
  "ClusterId": "dQw4w9WgXcQ",
  "VoterId": 1,
  "Topics": [{
      "TopicName": "orders",
      "Partitions": [{
          "PartitionIndex": 3,
          "ReplicaEpoch": 12,
          "ReplicaId": -1,
          "ReplicaDirectoryId": "550e8400-e29b-41d4-a716-446655440000",
          "VoterDirectoryId": "550e8400-e29b-41d4-a716-446655440000",
          "LastOffsetEpoch": 12,
          "LastOffset": 150382
      }]
  }]
}