conduktor.io ↗

Kafka ApiVersions Response Wire Format v4 — Binary Protocol Layout

What is ApiVersions?

Sent by every client on every new connection to discover what API versions the broker supports. UNSUPPORTED_VERSION errors in client logs appear when a client is newer than the broker; this API prevents that by letting the client downgrade gracefully.

Related Errors

INVALID_REQUEST · UNSUPPORTED_VERSION

Wire Diagram

Response Header · flexible
message_size int32 · 4B
correlation_id int32 · 4B
tagged var
ApiVersionsResponse v4
ErrorCode int16 · 2B
ApiKeys array
ThrottleTimeMs int32 · 4B
SupportedFeatures array
FinalizedFeaturesEpoch int64 · 8B
FinalizedFeatures array
ZkMigrationReady bool · 1B
tagged var
ApiKey int16 · 2B
MinVersion int16 · 2B
MaxVersion int16 · 2B
tagged var
Name string (compact)
MinVersion int16 · 2B
MaxVersion int16 · 2B
tagged var
Name string (compact)
MaxVersionLevel int16 · 2B
MinVersionLevel int16 · 2B
tagged var

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
}
Example
{
  "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
}