conduktor.io ↗

Kafka ApiVersions Response Wire Format v3 — Binary Protocol Layout

What is ApiVersions?

Clients can use this API to discover version ranges advertised by the connected broker or controller. The result depends on the listener and enabled features. Clients may select a mutually supported version; this does not guarantee semantic compatibility, and unsupported-version errors still require handling. ApiVersions responses always use response header v0, including flexible bodies.

Related Errors

INVALID_REQUEST · REBOOTSTRAP_REQUIRED · UNSUPPORTED_VERSION

Wire Diagram

Response Header v0
message_size int32 · 4B
correlation_id int32 · 4B
ApiVersionsResponse v3
ErrorCode int16 · 2B
ApiKeys array
ThrottleTimeMs int32 · 4B
tagged var
ApiKey int16 · 2B
MinVersion int16 · 2B
MaxVersion int16 · 2B
tagged var
Known optional payloads inside tagged buffer
tag 0: SupportedFeatures []SupportedFeatureKey
tag 1: FinalizedFeaturesEpoch int64
tag 2: FinalizedFeatures []FinalizedFeatureKey
tag 3: ZkMigrationReady bool

Schema & Example

Schema
{
  "ErrorCode": int16,
  "ApiKeys": [{
      "ApiKey": int16,
      "MinVersion": int16,
      "MaxVersion": int16
  }],
  "ThrottleTimeMs": int32,
  "SupportedFeatures": [{
      "Name": string,
      "MinVersion": int16,
      "MaxVersion": int16
  }],
  "FinalizedFeaturesEpoch": int64,
  "FinalizedFeatures": [{
      "Name": string,
      "MaxVersionLevel": int16,
      "MinVersionLevel": int16
  }],
  "ZkMigrationReady": bool
}
Illustrative values (not encoded bytes)
{
  "ErrorCode": 0,
  "ApiKeys": [{
      "ApiKey": 0,
      "MinVersion": 1,
      "MaxVersion": 1
  }],
  "ThrottleTimeMs": 0,
  "SupportedFeatures": [{
      "Name": "orders",
      "MinVersion": 1,
      "MaxVersion": 1
  }],
  "FinalizedFeaturesEpoch": 12,
  "FinalizedFeatures": [{
      "Name": "orders",
      "MaxVersionLevel": 1,
      "MinVersionLevel": 1
  }],
  "ZkMigrationReady": true
}