conduktor.io ↗

Kafka Vote Response 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

Response Header · flexible
message_size int32 · 4B
correlation_id int32 · 4B
tagged var
VoteResponse v1
ErrorCode int16 · 2B
Topics array
NodeEndpoints array
tagged var
TopicName string (compact)
Partitions array
tagged var
PartitionIndex int32 · 4B
ErrorCode int16 · 2B
LeaderId int32 · 4B
LeaderEpoch int32 · 4B
VoteGranted bool · 1B
tagged var
NodeId int32 · 4B
Host string (compact)
Port uint16 · 2B
tagged var

Schema & Example

Schema
{
  "ErrorCode": int16,
  "Topics": [{
      "TopicName": string,
      "Partitions": [{
          "PartitionIndex": int32,
          "ErrorCode": int16,
          "LeaderId": int32,
          "LeaderEpoch": int32,
          "VoteGranted": bool
      }]
  }],
  "NodeEndpoints": [{
      "NodeId": int32,
      "Host": string,
      "Port": uint16
  }]
}
Example
{
  "ErrorCode": 0,
  "Topics": [{
      "TopicName": "orders",
      "Partitions": [{
          "PartitionIndex": 3,
          "ErrorCode": 0,
          "LeaderId": 1,
          "LeaderEpoch": 17,
          "VoteGranted": true
      }]
  }],
  "NodeEndpoints": [{
      "NodeId": 1,
      "Host": "broker-1.kafka.local",
      "Port": 9092
  }]
}