conduktor.io ↗

Kafka BeginQuorumEpoch Request Wire Format v1 — Binary Protocol Layout

What is BeginQuorumEpoch?

The newly elected KRaft leader sends this to all quorum voters to establish itself for the new epoch. Metadata writes pending from the old epoch will be replicated or dropped based on the new leader's log end offset.

Related Errors

INCONSISTENT_VOTER_SET

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
BeginQuorumEpochRequest v1
ClusterId? string (compact)
VoterId int32 · 4B
Topics array
LeaderEndpoints array
tagged var
TopicName string (compact)
Partitions array
tagged var
PartitionIndex int32 · 4B
VoterDirectoryId uuid · 16B
LeaderId int32 · 4B
LeaderEpoch int32 · 4B
tagged var
Name string (compact)
Host string (compact)
Port uint16 · 2B
tagged var

Schema & Example

Schema
{
  "ClusterId": string?,
  "VoterId": int32,
  "Topics": [{
      "TopicName": string,
      "Partitions": [{
          "PartitionIndex": int32,
          "VoterDirectoryId": uuid,
          "LeaderId": int32,
          "LeaderEpoch": int32
      }]
  }],
  "LeaderEndpoints": [{
      "Name": string,
      "Host": string,
      "Port": uint16
  }]
}
Example
{
  "ClusterId": null,
  "VoterId": 1,
  "Topics": [{
      "TopicName": "orders",
      "Partitions": [{
          "PartitionIndex": 3,
          "VoterDirectoryId": "550e8400-e29b-41d4-a716-446655440000",
          "LeaderId": 1,
          "LeaderEpoch": 17
      }]
  }],
  "LeaderEndpoints": [{
      "Name": "orders",
      "Host": "broker-1.kafka.local",
      "Port": 9092
  }]
}