...
1// ApiVersionsRequest requests what API versions a Kafka broker supports.
2//
3// Note that the client does not know the version a broker supports before
4// sending this request.
5//
6// Before Kafka 2.4.0, if the client used a version larger than the broker
7// understands, the broker would reply with an UNSUPPORTED_VERSION error using
8// the version 0 message format (i.e., 6 bytes long!). The client should retry
9// with a lower version.
10//
11// After Kafka 2.4.0, if the client uses a version larger than the broker
12// understands, the broker replies with UNSUPPORTED_VERSIONS using the version
13// 0 message format but additionally includes the api versions the broker does
14// support.
15ApiVersionsRequest => key 18, max version 3, flexible v3+
16 // ClientSoftwareName, added for KIP-511 with Kafka 2.4.0, is the name of the
17 // client issuing this request. The broker can use this to enrich its own
18 // debugging information of which version of what clients are connected.
19 //
20 // If using v3, this field is required and must match the following pattern:
21 //
22 // [a-zA-Z0-9](?:[a-zA-Z0-9\\-.]*[a-zA-Z0-9])?
23 //
24 ClientSoftwareName: string // v3+
25 // ClientSoftwareVersion is the version of the software name in the prior
26 // field. It must match the same regex (thus, this is also required).
27 ClientSoftwareVersion: string // v3+
28
29// ApiVersionsResponse is returned from an ApiVersionsRequest.
30ApiVersionsResponse =>
31 // ErrorCode is UNSUPPORTED_VERSION if the request was issued with a higher
32 // version than the broker supports. Before Kafka 2.4.0, if this error is
33 // returned, the rest of this struct will be empty.
34 //
35 // Starting in Kafka 2.4.0 (with version 3), even with an UNSUPPORTED_VERSION
36 // error, the broker still replies with the ApiKeys it supports.
37 ErrorCode: int16
38 // ApiKeys is an array corresponding to API keys the broker supports
39 // and the range of supported versions for each key.
40 ApiKeys: [=>]
41 // ApiKey is the key of a message request.
42 ApiKey: int16
43 // MinVersion is the min version a broker supports for an API key.
44 MinVersion: int16
45 // MaxVersion is the max version a broker supports for an API key.
46 MaxVersion: int16
47 ThrottleMillis(2) // v1+
48 // Features supported by the broker (see KIP-584).
49 SupportedFeatures: [=>] // tag 0
50 // The name of the feature.
51 Name: string
52 // The minimum supported version for the feature.
53 MinVersion: int16
54 // The maximum supported version for the feature.
55 MaxVersion: int16
56 // The monotonically increasing epoch for the finalized features information,
57 // where -1 indicates an unknown epoch.
58 FinalizedFeaturesEpoch: int64(-1) // tag 1
59 // The list of cluster-wide finalized features (only valid if
60 // FinalizedFeaturesEpoch is >= 0).
61 FinalizedFeatures: [=>] // tag 2
62 // The name of the feature.
63 Name: string
64 // The cluster-wide finalized max version level for the feature.
65 MaxVersionLevel: int16
66 // The cluster-wide finalized min version level for the feature.
67 MinVersionLevel: int16
68 // Set by a KRaft controller if the required configurations for ZK migration
69 // are present
70 ZkMigrationReady: bool // tag 3
View as plain text