Skip to content
m manifester.io
All Kafka APIs

EndQuorumEpoch

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
54
Encoded at
v1
Flexible versions
1+
Headers
req v2, resp v1
Request versions
0-1
Response versions
0-1
Request size
62 bytes
Response size
31 bytes
framerpc headerrequest bodyRecordBatchRecordresponse bodytagged_fields

Request

EndQuorumEpochRequest v1, request header v2, 62 bytes on the wire

byte layout (62 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

EndQuorumEpochRequest                                 message v1                                                [0x0000, 62B]
+-- Frame                                                                                                       [0x0000, 4B]   length-delimited framing
|   +-- size                                          int32             = 58                                    [0x0000, 4B]   number of bytes that follow, patched after encoding
+-- RequestHeader                                     v2                                                        [0x0004, 11B]  common request header
|   +-- request_api_key                               int16             = 54 (EndQuorumEpoch)                   [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
+-- EndQuorumEpochRequest                             struct                                                    [0x000f, 47B]  message body, version 1
    +-- ClusterId                                     string            = "" (compact, len+1=1)                 [0x000f, 1B]   The cluster id.
    +-- Topics                                        []TopicData       = 1 element                             [0x0010, 39B]  The topics.
    |   +-- length                                    uvarint           = 2 (compact, n+1)                      [0x0010, 1B]   one sample element follows
    |   +-- TopicData[0]                              TopicData         = struct                                [0x0011, 38B]
    |       +-- TopicName                             string            = "" (compact, len+1=1)                 [0x0011, 1B]   The topic name.
    |       +-- Partitions                            []PartitionData   = 1 element                             [0x0012, 36B]  The partitions.
    |       |   +-- length                            uvarint           = 2 (compact, n+1)                      [0x0012, 1B]   one sample element follows
    |       |   +-- PartitionData[0]                  PartitionData     = struct                                [0x0013, 35B]
    |       |       +-- PartitionIndex                int32             = 0                                     [0x0013, 4B]   The partition index.
    |       |       +-- LeaderId                      int32             = 0                                     [0x0017, 4B]   The current leader ID that is resigning.
    |       |       +-- LeaderEpoch                   int32             = 0                                     [0x001b, 4B]   The current epoch.
    |       |       +-- PreferredCandidates           []ReplicaInfo     = 1 element                             [0x001f, 22B]  A sorted list of preferred candidates to start the election.
    |       |       |   +-- length                    uvarint           = 2 (compact, n+1)                      [0x001f, 1B]   one sample element follows
    |       |       |   +-- ReplicaInfo[0]            ReplicaInfo       = struct                                [0x0020, 21B]
    |       |       |       +-- CandidateId           int32             = 0                                     [0x0020, 4B]   The ID of the candidate replica.
    |       |       |       +-- CandidateDirectoryId  uuid              = 00000000-0000-0000-0000-000000000000  [0x0024, 16B]  The directory ID of the candidate replica.
    |       |       |       +-- tagged_fields         uvarint           = 0                                     [0x0034, 1B]   number of tagged fields in this struct
    |       |       +-- tagged_fields                 uvarint           = 0                                     [0x0035, 1B]   number of tagged fields in this struct
    |       +-- tagged_fields                         uvarint           = 0                                     [0x0036, 1B]   number of tagged fields in this struct
    +-- LeaderEndpoints                               []LeaderEndpoint  = 1 element                             [0x0037, 6B]   Endpoints for the leader.
    |   +-- length                                    uvarint           = 2 (compact, n+1)                      [0x0037, 1B]   one sample element follows
    |   +-- LeaderEndpoint[0]                         LeaderEndpoint    = struct                                [0x0038, 5B]
    |       +-- Name                                  string            = "" (compact, len+1=1)                 [0x0038, 1B]   The name of the endpoint.
    |       +-- Host                                  string            = "" (compact, len+1=1)                 [0x0039, 1B]   The node's hostname.
    |       +-- Port                                  uint16            = 0                                     [0x003a, 2B]   The node's port.
    |       +-- tagged_fields                         uvarint           = 0                                     [0x003c, 1B]   number of tagged fields in this struct
    +-- tagged_fields                                 uvarint           = 0                                     [0x003d, 1B]   number of tagged fields in this struct

kafka message schema (.json)

{
  "apiKey": 54,
  "type": "request",
  "listeners": ["controller"],
  "name": "EndQuorumEpochRequest",
  // Version 1 adds flexible versions, replaces preferred successors with preferred candidates
  // and adds 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": "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": "LeaderId", "type": "int32", "versions": "0+", "entityType": "brokerId",
              "about": "The current leader ID that is resigning."},
            { "name": "LeaderEpoch", "type": "int32", "versions": "0+",
              "about": "The current epoch."},
            { "name": "PreferredSuccessors", "type": "[]int32", "versions": "0", "ignorable": true,
              "about": "A sorted list of preferred successors to start the election." },
            { "name": "PreferredCandidates", "type": "[]ReplicaInfo", "versions": "1+", "ignorable": true,
              "about": "A sorted list of preferred candidates to start the election.", "fields": [
                { "name": "CandidateId", "type": "int32", "versions": "1+", "entityType": "brokerId",
                  "about": "The ID of the candidate replica."},
                { "name": "CandidateDirectoryId", "type": "uuid", "versions": "1+",
                  "about": "The directory ID of the candidate replica."}
              ]
            }
          ]
        }
      ]
    },
    { "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

EndQuorumEpochResponse 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

EndQuorumEpochResponse                  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
+-- EndQuorumEpochResponse              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 partition level error code.
    |       |       +-- 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": 54,
  "type": "response",
  "name": "EndQuorumEpochResponse",
  // 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 partition level error code."},
            { "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." }
      ]
    }
  ]
}