Skip to content
m manifester.io
All Kafka APIs

AlterClientQuotas

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

Request

AlterClientQuotasRequest v1, request header v2, 35 bytes on the wire

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

AlterClientQuotasRequest               message v1                                 [0x0000, 35B]
+-- Frame                                                                         [0x0000, 4B]   length-delimited framing
|   +-- size                           int32            = 31                      [0x0000, 4B]   number of bytes that follow, patched after encoding
+-- RequestHeader                      v2                                         [0x0004, 11B]  common request header
|   +-- request_api_key                int16            = 49 (AlterClientQuotas)  [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
+-- AlterClientQuotasRequest           struct                                     [0x000f, 20B]  message body, version 1
    +-- Entries                        []EntryData      = 1 element               [0x000f, 18B]  The quota configuration entries to alter.
    |   +-- length                     uvarint          = 2 (compact, n+1)        [0x000f, 1B]   one sample element follows
    |   +-- EntryData[0]               EntryData        = struct                  [0x0010, 17B]
    |       +-- Entity                 []EntityData     = 1 element               [0x0010, 4B]   The quota entity to alter.
    |       |   +-- length             uvarint          = 2 (compact, n+1)        [0x0010, 1B]   one sample element follows
    |       |   +-- EntityData[0]      EntityData       = struct                  [0x0011, 3B]
    |       |       +-- EntityType     string           = "" (compact, len+1=1)   [0x0011, 1B]   The entity type.
    |       |       +-- EntityName     string           = "" (compact, len+1=1)   [0x0012, 1B]   The name of the entity, or null if the default.
    |       |       +-- tagged_fields  uvarint          = 0                       [0x0013, 1B]   number of tagged fields in this struct
    |       +-- Ops                    []OpData         = 1 element               [0x0014, 12B]  An individual quota configuration entry to alter.
    |       |   +-- length             uvarint          = 2 (compact, n+1)        [0x0014, 1B]   one sample element follows
    |       |   +-- OpData[0]          OpData           = struct                  [0x0015, 11B]
    |       |       +-- Key            string           = "" (compact, len+1=1)   [0x0015, 1B]   The quota configuration key.
    |       |       +-- Value          float64          = 0                       [0x0016, 8B]   The value to set, otherwise ignored if the value is to be removed.
    |       |       +-- Remove         bool             = false                   [0x001e, 1B]   Whether the quota configuration value should be removed, otherwise set.
    |       |       +-- tagged_fields  uvarint          = 0                       [0x001f, 1B]   number of tagged fields in this struct
    |       +-- tagged_fields          uvarint          = 0                       [0x0020, 1B]   number of tagged fields in this struct
    +-- ValidateOnly                   bool             = false                   [0x0021, 1B]   Whether the alteration should be validated, but not performed.
    +-- tagged_fields                  uvarint          = 0                       [0x0022, 1B]   number of tagged fields in this struct

kafka message schema (.json)

{
  "apiKey": 49,
  "type": "request",
  "listeners": ["broker", "controller"],
  "name": "AlterClientQuotasRequest",
  "validVersions": "0-1",
  // Version 1 enables flexible versions.
  "flexibleVersions": "1+",
  "fields": [
    { "name": "Entries", "type": "[]EntryData", "versions": "0+",
      "about": "The quota configuration entries to alter.", "fields": [
      { "name": "Entity", "type": "[]EntityData", "versions": "0+",
        "about": "The quota entity to alter.", "fields": [
        { "name": "EntityType", "type": "string", "versions": "0+",
          "about": "The entity type." },
        { "name": "EntityName", "type": "string", "versions": "0+", "nullableVersions": "0+",
          "about": "The name of the entity, or null if the default." }
      ]},
      { "name": "Ops", "type": "[]OpData", "versions": "0+",
        "about": "An individual quota configuration entry to alter.", "fields": [
        { "name": "Key", "type": "string", "versions": "0+",
          "about": "The quota configuration key." },
        { "name": "Value", "type": "float64", "versions": "0+",
          "about": "The value to set, otherwise ignored if the value is to be removed." },
        { "name": "Remove", "type": "bool", "versions": "0+",
          "about": "Whether the quota configuration value should be removed, otherwise set." }
      ]}
    ]},
    { "name": "ValidateOnly", "type": "bool", "versions": "0+",
      "about": "Whether the alteration should be validated, but not performed." }
  ]
}

Response

AlterClientQuotasResponse v1, response header v1, 23 bytes on the wire

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

AlterClientQuotasResponse              message v1                             [0x0000, 23B]
+-- Frame                                                                     [0x0000, 4B]   length-delimited framing
|   +-- size                           int32         = 19                     [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
+-- AlterClientQuotasResponse          struct                                 [0x0009, 14B]  message body, version 1
    +-- ThrottleTimeMs                 int32         = 0                      [0x0009, 4B]   The duration in milliseconds for which the request was throttled due to a q...
    +-- Entries                        []EntryData   = 1 element              [0x000d, 9B]   The quota configuration entries to alter.
    |   +-- length                     uvarint       = 2 (compact, n+1)       [0x000d, 1B]   one sample element follows
    |   +-- EntryData[0]               EntryData     = struct                 [0x000e, 8B]
    |       +-- ErrorCode              int16         = 0                      [0x000e, 2B]   The error code, or `0` if the quota alteration succeeded.
    |       +-- ErrorMessage           string        = "" (compact, len+1=1)  [0x0010, 1B]   The error message, or `null` if the quota alteration succeeded.
    |       +-- Entity                 []EntityData  = 1 element              [0x0011, 4B]   The quota entity to alter.
    |       |   +-- length             uvarint       = 2 (compact, n+1)       [0x0011, 1B]   one sample element follows
    |       |   +-- EntityData[0]      EntityData    = struct                 [0x0012, 3B]
    |       |       +-- EntityType     string        = "" (compact, len+1=1)  [0x0012, 1B]   The entity type.
    |       |       +-- EntityName     string        = "" (compact, len+1=1)  [0x0013, 1B]   The name of the entity, or null if the default.
    |       |       +-- tagged_fields  uvarint       = 0                      [0x0014, 1B]   number of tagged fields in this struct
    |       +-- tagged_fields          uvarint       = 0                      [0x0015, 1B]   number of tagged fields in this struct
    +-- tagged_fields                  uvarint       = 0                      [0x0016, 1B]   number of tagged fields in this struct

kafka message schema (.json)

{
  "apiKey": 49,
  "type": "response",
  "name": "AlterClientQuotasResponse",
  // Version 1 enables flexible versions.
  "validVersions": "0-1",
  "flexibleVersions": "1+",
  "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": "Entries", "type": "[]EntryData", "versions": "0+",
      "about": "The quota configuration entries to alter.", "fields": [
      { "name": "ErrorCode", "type": "int16", "versions": "0+",
        "about": "The error code, or `0` if the quota alteration succeeded." },
      { "name": "ErrorMessage", "type": "string", "versions": "0+", "nullableVersions": "0+",
        "about": "The error message, or `null` if the quota alteration succeeded." },
      { "name": "Entity", "type": "[]EntityData", "versions": "0+",
        "about": "The quota entity to alter.", "fields": [
        { "name": "EntityType", "type": "string", "versions": "0+",
          "about": "The entity type." },
        { "name": "EntityName", "type": "string", "versions": "0+", "nullableVersions": "0+",
          "about": "The name of the entity, or null if the default." }
      ]}
    ]}
  ]
}