...
1// IncrementalAlterConfigsRequest issues ar equest to alter either topic or
2// broker configs.
3//
4// This API was added in Kafka 2.3.0 to replace AlterConfigs. The key benefit
5// of this API is that consumers do not need to know the full config state
6// to add or remove new config options. See KIP-339 for more details.
7IncrementalAlterConfigsRequest => key 44, max version 1, flexible v1+
8 // Resources is an array of configs to alter.
9 Resources: [=>]
10 // ResourceType is an enum corresponding to the type of config to alter.
11 ResourceType: enum-ConfigResourceType
12 // ResourceName is the name of config to alter.
13 //
14 // If the requested type is a topic, this corresponds to a topic name.
15 //
16 // If the requested type if a broker, this should either be empty or be
17 // the ID of the broker this request is issued to. If it is empty, this
18 // updates all broker configs. If a specific ID, this updates just the
19 // broker. Using a specific ID also ensures that brokers reload config
20 // or secret files even if the file path has not changed. Lastly, password
21 // config options can only be defined on a per broker basis.
22 //
23 // If the type is broker logger, this must be a broker ID.
24 ResourceName: string
25 // Configs contains key/value config pairs to set on the resource.
26 Configs: [=>]
27 // Name is a key to modify (e.g. segment.bytes).
28 //
29 // For broker loggers, see KIP-412 section "Request/Response Overview"
30 // for details on how to change per logger log levels.
31 Name: string
32 // Op is the type of operation to perform for this config name.
33 //
34 // SET (0) is to set a configuration value; the value must not be null.
35 //
36 // DELETE (1) is to delete a configuration key.
37 //
38 // APPEND (2) is to add a value to the list of values for a key (if the
39 // key is for a list of values).
40 //
41 // SUBTRACT (3) is to remove a value from a list of values (if the key
42 // is for a list of values).
43 Op: enum-IncrementalAlterConfigOp
44 // Value is a value to set for the key (e.g. 10).
45 Value: nullable-string
46 // ValidateOnly validates the request but does not apply it.
47 ValidateOnly: bool
48
49// IncrementalAlterConfigsResponse is returned from an IncrementalAlterConfigsRequest.
50IncrementalAlterConfigsResponse =>
51 ThrottleMillis
52 // Resources are responses for each resources in the alter request.
53 Resources: [=>]
54 // ErrorCode is the error code returned for incrementally altering configs.
55 //
56 // CLUSTER_AUTHORIZATION_FAILED is returned if asking to alter broker
57 // configs but the client is not authorized to do so.
58 //
59 // TOPIC_AUTHORIZATION_FAILED is returned if asking to alter topic
60 // configs but the client is not authorized to do so.
61 //
62 // INVALID_TOPIC_EXCEPTION is returned if the requested topic was invalid.
63 //
64 // UNKNOWN_TOPIC_OR_PARTITION is returned if the broker does not know of
65 // the requested topic.
66 //
67 // INVALID_REQUEST is returned if the requested config is invalid or if
68 // asking Kafka to alter an invalid resource.
69 ErrorCode: int16
70 // ErrorMessage is an informative message if the incremental alter config failed.
71 ErrorMessage: nullable-string
72 // ResourceType is the enum corresponding to the type of altered config.
73 ResourceType: enum-ConfigResourceType
74 // ResourceName is the name corresponding to the incremental alter config
75 // request.
76 ResourceName: string
View as plain text