Skip to content
m manifester.io
All Kafka APIs

DescribeCluster

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 2 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
60
Encoded at
v2
Flexible versions
0+
Headers
req v2, resp v1
Request versions
0-2
Response versions
0-2
Request size
19 bytes
Response size
40 bytes
framerpc headerrequest bodyRecordBatchRecordresponse bodytagged_fields

Request

DescribeClusterRequest v2, request header v2, 19 bytes on the wire

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

DescribeClusterRequest                      message v2                               [0x0000, 19B]
+-- Frame                                                                            [0x0000, 4B]   length-delimited framing
|   +-- size                                int32            = 15                    [0x0000, 4B]   number of bytes that follow, patched after encoding
+-- RequestHeader                           v2                                       [0x0004, 11B]  common request header
|   +-- request_api_key                     int16            = 60 (DescribeCluster)  [0x0004, 2B]   numeric id of the API being invoked
|   +-- request_api_version                 int16            = 2                     [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
+-- DescribeClusterRequest                  struct                                   [0x000f, 4B]   message body, version 2
    +-- IncludeClusterAuthorizedOperations  bool             = false                 [0x000f, 1B]   Whether to include cluster authorized operations.
    +-- EndpointType                        int8             = 0                     [0x0010, 1B]   The endpoint type to describe. 1=brokers, 2=controllers.
    +-- IncludeFencedBrokers                bool             = false                 [0x0011, 1B]   Whether to include fenced brokers when listing brokers.
    +-- tagged_fields                       uvarint          = 0                     [0x0012, 1B]   number of tagged fields in this struct

kafka message schema (.json)

{
  "apiKey": 60,
  "type": "request",
  "listeners": ["broker", "controller"],
  "name": "DescribeClusterRequest",
  //
  // Version 1 adds EndpointType for KIP-919 support.
  // Version 2 adds IncludeFencedBrokers for KIP-1073 support.
  //
  "validVersions": "0-2",
  "flexibleVersions": "0+",
  "fields": [
    { "name": "IncludeClusterAuthorizedOperations", "type": "bool", "versions": "0+",
      "about": "Whether to include cluster authorized operations." },
    { "name": "EndpointType", "type": "int8", "versions": "1+", "default": "1",
      "about": "The endpoint type to describe. 1=brokers, 2=controllers." },
    { "name": "IncludeFencedBrokers", "type": "bool", "versions": "2+",
      "about": "Whether to include fenced brokers when listing brokers." }
  ]
}

Response

DescribeClusterResponse v2, response header v1, 40 bytes on the wire

byte layout (40 bytes, 16 bytes per row)

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

object tree

DescribeClusterResponse               message v2                                        [0x0000, 40B]
+-- Frame                                                                               [0x0000, 4B]   length-delimited framing
|   +-- size                          int32                    = 36                     [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
+-- DescribeClusterResponse           struct                                            [0x0009, 31B]  message body, version 2
    +-- ThrottleTimeMs                int32                    = 0                      [0x0009, 4B]   The duration in milliseconds for which the request was throttled due to a q...
    +-- ErrorCode                     int16                    = 0                      [0x000d, 2B]   The top-level error code, or 0 if there was no error.
    +-- ErrorMessage                  string                   = "" (compact, len+1=1)  [0x000f, 1B]   The top-level error message, or null if there was no error.
    +-- EndpointType                  int8                     = 0                      [0x0010, 1B]   The endpoint type that was described. 1=brokers, 2=controllers.
    +-- ClusterId                     string                   = "" (compact, len+1=1)  [0x0011, 1B]   The cluster ID that responding broker belongs to.
    +-- ControllerId                  int32                    = 0                      [0x0012, 4B]   The ID of the controller broker.
    +-- Brokers                       []DescribeClusterBroker  = 1 element              [0x0016, 13B]  Each broker in the response.
    |   +-- length                    uvarint                  = 2 (compact, n+1)       [0x0016, 1B]   one sample element follows
    |   +-- DescribeClusterBroker[0]  DescribeClusterBroker    = struct                 [0x0017, 12B]
    |       +-- BrokerId              int32                    = 0                      [0x0017, 4B]   The broker ID.
    |       +-- Host                  string                   = "" (compact, len+1=1)  [0x001b, 1B]   The broker hostname.
    |       +-- Port                  int32                    = 0                      [0x001c, 4B]   The broker port.
    |       +-- Rack                  string                   = "" (compact, len+1=1)  [0x0020, 1B]   The rack of the broker, or null if it has not been assigned to a rack.
    |       +-- IsFenced              bool                     = false                  [0x0021, 1B]   Whether the broker is fenced
    |       +-- tagged_fields         uvarint                  = 0                      [0x0022, 1B]   number of tagged fields in this struct
    +-- ClusterAuthorizedOperations   int32                    = 0                      [0x0023, 4B]   32-bit bitfield to represent authorized operations for this cluster.
    +-- tagged_fields                 uvarint                  = 0                      [0x0027, 1B]   number of tagged fields in this struct

kafka message schema (.json)

{
  "apiKey": 60,
  "type": "response",
  "name": "DescribeClusterResponse",
  //
  // Version 1 adds the EndpointType field, and makes MISMATCHED_ENDPOINT_TYPE and
  // UNSUPPORTED_ENDPOINT_TYPE valid top-level response error codes.
  // Version 2 adds IsFenced field to Brokers for KIP-1073 support.
  //
  "validVersions": "0-2",
  "flexibleVersions": "0+",
  "fields": [
    { "name": "ThrottleTimeMs", "type": "int32", "versions": "0+",
      "about": "The duration in milliseconds for which the request was throttled due to a quota violation, or zero if the request did not violate any quota." },
    { "name": "ErrorCode", "type": "int16", "versions": "0+",
      "about": "The top-level error code, or 0 if there was no error." },
    { "name": "ErrorMessage", "type": "string", "versions": "0+", "nullableVersions": "0+", "default": "null",
      "about": "The top-level error message, or null if there was no error." },
    { "name": "EndpointType", "type": "int8", "versions": "1+", "default": "1",
      "about": "The endpoint type that was described. 1=brokers, 2=controllers." },
    { "name": "ClusterId", "type": "string", "versions": "0+",
      "about": "The cluster ID that responding broker belongs to." },
    { "name": "ControllerId", "type": "int32", "versions": "0+", "default": "-1", "entityType": "brokerId",
      "about": "The ID of the controller broker." },
    { "name": "Brokers", "type": "[]DescribeClusterBroker", "versions": "0+",
      "about": "Each broker in the response.", "fields": [
      { "name": "BrokerId", "type": "int32", "versions": "0+", "mapKey": true, "entityType": "brokerId",
        "about": "The broker ID." },
      { "name": "Host", "type": "string", "versions": "0+",
        "about": "The broker hostname." },
      { "name": "Port", "type": "int32", "versions": "0+",
        "about": "The broker port." },
      { "name": "Rack", "type": "string", "versions": "0+", "nullableVersions": "0+", "default": "null",
        "about": "The rack of the broker, or null if it has not been assigned to a rack." },
      { "name": "IsFenced", "type": "bool", "versions": "2+",
        "about": "Whether the broker is fenced" }
    ]},
    { "name": "ClusterAuthorizedOperations", "type": "int32", "versions": "0+", "default": "-2147483648",
      "about": "32-bit bitfield to represent authorized operations for this cluster." }
  ]
}