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.
Wire Diagram
Response Header
message_size
int32 · 4B
correlation_id
int32 · 4B
ApiVersionsResponse v1
ErrorCode
int16 · 2B
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 }