conduktor.io ↗

Kafka ApiVersions Response Wire Format v2 — 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
message_size int32 · 4B
correlation_id int32 · 4B
ApiVersionsResponse v2
ErrorCode int16 · 2B
ApiKeys array
ThrottleTimeMs int32 · 4B
ApiKey int16 · 2B
MinVersion int16 · 2B
MaxVersion int16 · 2B

Schema & Example

Schema
{
  "ErrorCode": int16,
  "ApiKeys": [{
      "ApiKey": int16,
      "MinVersion": int16,
      "MaxVersion": int16
  }],
  "ThrottleTimeMs": int32
}
Example
{
  "ErrorCode": 0,
  "ApiKeys": [{
      "ApiKey": 0,
      "MinVersion": 1,
      "MaxVersion": 1
  }],
  "ThrottleTimeMs": 0
}