Skip to content
m manifester.io
All Kafka APIs

BeginQuorumEpoch

This page encodes the smallest legal instance of the request and the response: numeric fields are zero, strings and byte arrays are empty, every array carries exactly one sample element, and any records field holds one empty 61-byte RecordBatch v2. Version 1 is a flexible version, so every struct is terminated by a uvarint tagged-field count and strings and arrays carry compact length-plus-one prefixes. Sizes below include the leading int32 size prefix.

API key
53
Encoded at
v1
Flexible versions
1+
Headers
req v2, resp v1
Request versions
0-1
Response versions
0-1
Request size
60 bytes
Response size
31 bytes
framerpc headerrequest bodyRecordBatchRecordresponse bodytagged_fields

Request

BeginQuorumEpochRequest v1, request header v2, 60 bytes on the wire

byte layout (60 bytes, 16 bytes per row)

0
1
2
3
4
5
6
7
8
9
A
B
C
D
E
F
0000
0010
0020
0030

object tree

BeginQuorumEpochRequest                   message v1                                                [0x0000, 60B]
+-- Frame                                                                                           [0x0000, 4B]   length-delimited framing
|   +-- size                              int32             = 56                                    [0x0000, 4B]   number of bytes that follow, patched after encoding
+-- RequestHeader                         v2                                                        [0x0004, 11B]  common request header
|   +-- request_api_key                   int16             = 53 (BeginQuorumEpoch)                 [0x0004, 2B]   numeric id of the API being invoked
|   +-- request_api_version               int16             = 1                                     [0x0006, 2B]   version of the API being invoked
|   +-- correlation_id                    int32             = 0                                     [0x0008, 4B]   echoed back by the broker in the response
|   +-- client_id                         nullable_string   = "" (int16 len=0)                      [0x000c, 2B]   always a non-flexible int16-prefixed string
|   +-- tagged_fields                     uvarint           = 0                                     [0x000e, 1B]   number of tagged fields in the header
+-- BeginQuorumEpochRequest               struct                                                    [0x000f, 45B]  message body, version 1
    +-- ClusterId                         string            = "" (compact, len+1=1)                 [0x000f, 1B]   The cluster id.
    +-- VoterId                           int32             = 0                                     [0x0010, 4B]   The replica id of the voter receiving the request.
    +-- Topics                            []TopicData       = 1 element                             [0x0014, 33B]  The topics.
    |   +-- length                        uvarint           = 2 (compact, n+1)                      [0x0014, 1B]   one sample element follows
    |   +-- TopicData[0]                  TopicData         = struct                                [0x0015, 32B]
    |       +-- TopicName                 string            = "" (compact, len+1=1)                 [0x0015, 1B]   The topic name.
    |       +-- Partitions                []PartitionData   = 1 element                             [0x0016, 30B]  The partitions.
    |       |   +-- length                uvarint           = 2 (compact, n+1)                      [0x0016, 1B]   one sample element follows
    |       |   +-- PartitionData[0]      PartitionData     = struct                                [0x0017, 29B]
    |       |       +-- PartitionIndex    int32             = 0                                     [0x0017, 4B]   The partition index.
    |       |       +-- VoterDirectoryId  uuid              = 00000000-0000-0000-0000-000000000000  [0x001b, 16B]  The directory id of the receiving replica.
    |       |       +-- LeaderId          int32             = 0                                     [0x002b, 4B]   The ID of the newly elected leader.
    |       |       +-- LeaderEpoch       int32             = 0                                     [0x002f, 4B]   The epoch of the newly elected leader.
    |       |       +-- tagged_fields     uvarint           = 0                                     [0x0033, 1B]   number of tagged fields in this struct
    |       +-- tagged_fields             uvarint           = 0                                     [0x0034, 1B]   number of tagged fields in this struct
    +-- LeaderEndpoints                   []LeaderEndpoint  = 1 element                             [0x0035, 6B]   Endpoints for the leader.
    |   +-- length                        uvarint           = 2 (compact, n+1)                      [0x0035, 1B]   one sample element follows
    |   +-- LeaderEndpoint[0]             LeaderEndpoint    = struct                                [0x0036, 5B]
    |       +-- Name                      string            = "" (compact, len+1=1)                 [0x0036, 1B]   The name of the endpoint.
    |       +-- Host                      string            = "" (compact, len+1=1)                 [0x0037, 1B]   The node's hostname.
    |       +-- Port                      uint16            = 0                                     [0x0038, 2B]   The node's port.
    |       +-- tagged_fields             uvarint           = 0                                     [0x003a, 1B]   number of tagged fields in this struct
    +-- tagged_fields                     uvarint           = 0                                     [0x003b, 1B]   number of tagged fields in this struct

kafka message schema (.json)

{
  "apiKey": 53,
  "type": "request",
  "listeners": ["controller"],
  "name": "BeginQuorumEpochRequest",
  // Version 1 adds flexible versions, voter key and leader endpoints (KIP-853)
  "validVersions": "0-1",
  "flexibleVersions": "1+",
  "fields": [
    { "name": "ClusterId", "type": "string", "versions": "0+",
      "nullableVersions": "0+", "default": "null",
      "about": "The cluster id." },
    { "name": "VoterId", "type": "int32", "versions": "1+", "ignorable": true, "default": "-1", "entityType": "brokerId",
      "about": "The replica id of the voter receiving the request." },
    { "name": "Topics", "type": "[]TopicData", "versions": "0+",
      "about": "The topics.", "fields": [
        { "name": "TopicName", "type": "string", "versions": "0+", "entityType": "topicName",
          "about": "The topic name." },
        { "name": "Partitions", "type": "[]PartitionData", "versions": "0+",
          "about": "The partitions.", "fields": [
            { "name": "PartitionIndex", "type": "int32", "versions": "0+",
              "about": "The partition index." },
            { "name": "VoterDirectoryId", "type": "uuid", "versions": "1+", "ignorable": true,
              "about": "The directory id of the receiving replica." },
            { "name": "LeaderId", "type": "int32", "versions": "0+", "entityType": "brokerId",
              "about": "The ID of the newly elected leader." },
            { "name": "LeaderEpoch", "type": "int32", "versions": "0+",
              "about": "The epoch of the newly elected leader." }
          ]
        }
      ]
    },
    { "name": "LeaderEndpoints", "type": "[]LeaderEndpoint", "versions": "1+", "ignorable": true,
      "about": "Endpoints for the leader.", "fields": [
        { "name": "Name", "type": "string", "versions": "1+", "mapKey": true, "about": "The name of the endpoint." },
        { "name": "Host", "type": "string", "versions": "1+", "about": "The node's hostname." },
        { "name": "Port", "type": "uint16", "versions": "1+", "about": "The node's port." }
      ]
    }
  ]
}

Response

BeginQuorumEpochResponse v1, response header v1, 31 bytes on the wire

byte layout (31 bytes, 16 bytes per row)

0
1
2
3
4
5
6
7
8
9
A
B
C
D
E
F
0000
0010

object tree

BeginQuorumEpochResponse                message v1                                [0x0000, 31B]
+-- Frame                                                                         [0x0000, 4B]   length-delimited framing
|   +-- size                            int32            = 27                     [0x0000, 4B]   number of bytes that follow, patched after encoding
+-- ResponseHeader                      v1                                        [0x0004, 5B]   common response header
|   +-- correlation_id                  int32            = 0                      [0x0004, 4B]   matches the correlation_id of the request
|   +-- tagged_fields                   uvarint          = 0                      [0x0008, 1B]   number of tagged fields in the header
+-- BeginQuorumEpochResponse            struct                                    [0x0009, 22B]  message body, version 1
    +-- ErrorCode                       int16            = 0                      [0x0009, 2B]   The top level error code.
    +-- Topics                          []TopicData      = 1 element              [0x000b, 19B]  The topic data.
    |   +-- length                      uvarint          = 2 (compact, n+1)       [0x000b, 1B]   one sample element follows
    |   +-- TopicData[0]                TopicData        = struct                 [0x000c, 18B]
    |       +-- TopicName               string           = "" (compact, len+1=1)  [0x000c, 1B]   The topic name.
    |       +-- Partitions              []PartitionData  = 1 element              [0x000d, 16B]  The partition data.
    |       |   +-- length              uvarint          = 2 (compact, n+1)       [0x000d, 1B]   one sample element follows
    |       |   +-- PartitionData[0]    PartitionData    = struct                 [0x000e, 15B]
    |       |       +-- PartitionIndex  int32            = 0                      [0x000e, 4B]   The partition index.
    |       |       +-- ErrorCode       int16            = 0                      [0x0012, 2B]   The error code for this partition.
    |       |       +-- LeaderId        int32            = 0                      [0x0014, 4B]   The ID of the current leader or -1 if the leader is unknown.
    |       |       +-- LeaderEpoch     int32            = 0                      [0x0018, 4B]   The latest known leader epoch.
    |       |       +-- tagged_fields   uvarint          = 0                      [0x001c, 1B]   number of tagged fields in this struct
    |       +-- tagged_fields           uvarint          = 0                      [0x001d, 1B]   number of tagged fields in this struct
    +-- tagged_fields                   uvarint          = 0                      [0x001e, 1B]   number of tagged fields in this struct

kafka message schema (.json)

{
  "apiKey": 53,
  "type": "response",
  "name": "BeginQuorumEpochResponse",
  // Version 1 adds flexible versions and leader endpoint (KIP-853)
  "validVersions": "0-1",
  "flexibleVersions": "1+",
  "fields": [
    { "name": "ErrorCode", "type": "int16", "versions": "0+",
      "about": "The top level error code."},
    { "name": "Topics", "type": "[]TopicData", "versions": "0+",
      "about": "The topic data.", "fields": [
        { "name": "TopicName", "type": "string", "versions": "0+", "entityType": "topicName",
          "about": "The topic name." },
        { "name": "Partitions", "type": "[]PartitionData", "versions": "0+",
          "about": "The partition data.", "fields": [
            { "name": "PartitionIndex", "type": "int32", "versions": "0+",
              "about": "The partition index." },
            { "name": "ErrorCode", "type": "int16", "versions": "0+",
              "about": "The error code for this partition."},
            { "name": "LeaderId", "type": "int32", "versions": "0+", "entityType": "brokerId",
              "about": "The ID of the current leader or -1 if the leader is unknown."},
            { "name": "LeaderEpoch", "type": "int32", "versions": "0+",
              "about": "The latest known leader epoch."}
          ]
        }
      ]
    },
    { "name": "NodeEndpoints", "type": "[]NodeEndpoint", "versions": "1+", "taggedVersions": "1+", "tag": 0,
      "about": "Endpoints for all leaders enumerated in PartitionData.", "fields": [
        { "name": "NodeId", "type": "int32", "versions": "1+",
          "mapKey": true, "entityType": "brokerId", "about": "The ID of the associated node." },
        { "name": "Host", "type": "string", "versions": "1+", "about": "The node's hostname." },
        { "name": "Port", "type": "uint16", "versions": "1+", "about": "The node's port." }
      ]
    }
  ]
}