kafka-python 3.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- kafka/__init__.py +34 -0
- kafka/__main__.py +5 -0
- kafka/admin/__init__.py +29 -0
- kafka/admin/__main__.py +5 -0
- kafka/admin/_acls.py +355 -0
- kafka/admin/_cluster.py +359 -0
- kafka/admin/_configs.py +479 -0
- kafka/admin/_groups.py +754 -0
- kafka/admin/_partitions.py +595 -0
- kafka/admin/_topics.py +281 -0
- kafka/admin/_transactions.py +450 -0
- kafka/admin/_users.py +194 -0
- kafka/admin/client.py +373 -0
- kafka/benchmarks/__init__.py +0 -0
- kafka/benchmarks/consumer_performance.py +138 -0
- kafka/benchmarks/load_example.py +109 -0
- kafka/benchmarks/producer_encode_path.py +201 -0
- kafka/benchmarks/producer_performance.py +161 -0
- kafka/benchmarks/profile_protocol.py +138 -0
- kafka/benchmarks/protocol_old_vs_new.py +447 -0
- kafka/benchmarks/record_batch_compose.py +77 -0
- kafka/benchmarks/record_batch_read.py +82 -0
- kafka/benchmarks/varint_speed.py +426 -0
- kafka/cli/__init__.py +36 -0
- kafka/cli/admin/__init__.py +117 -0
- kafka/cli/admin/acls/__init__.py +9 -0
- kafka/cli/admin/acls/common.py +76 -0
- kafka/cli/admin/acls/create.py +19 -0
- kafka/cli/admin/acls/delete.py +23 -0
- kafka/cli/admin/acls/describe.py +16 -0
- kafka/cli/admin/cluster/__init__.py +14 -0
- kafka/cli/admin/cluster/describe.py +11 -0
- kafka/cli/admin/cluster/describe_quorum.py +11 -0
- kafka/cli/admin/cluster/features.py +52 -0
- kafka/cli/admin/cluster/log_dirs.py +43 -0
- kafka/cli/admin/cluster/versions.py +33 -0
- kafka/cli/admin/configs/__init__.py +10 -0
- kafka/cli/admin/configs/alter.py +43 -0
- kafka/cli/admin/configs/common.py +17 -0
- kafka/cli/admin/configs/describe.py +30 -0
- kafka/cli/admin/configs/list.py +16 -0
- kafka/cli/admin/configs/reset.py +20 -0
- kafka/cli/admin/groups/__init__.py +16 -0
- kafka/cli/admin/groups/alter_offsets.py +30 -0
- kafka/cli/admin/groups/delete.py +11 -0
- kafka/cli/admin/groups/delete_offsets.py +29 -0
- kafka/cli/admin/groups/describe.py +11 -0
- kafka/cli/admin/groups/list.py +28 -0
- kafka/cli/admin/groups/list_offsets.py +29 -0
- kafka/cli/admin/groups/remove_members.py +40 -0
- kafka/cli/admin/groups/reset_offsets.py +139 -0
- kafka/cli/admin/partitions/__init__.py +21 -0
- kafka/cli/admin/partitions/alter_reassignments.py +37 -0
- kafka/cli/admin/partitions/create.py +27 -0
- kafka/cli/admin/partitions/delete_records.py +31 -0
- kafka/cli/admin/partitions/describe.py +36 -0
- kafka/cli/admin/partitions/elect_leaders.py +53 -0
- kafka/cli/admin/partitions/list_offsets.py +88 -0
- kafka/cli/admin/partitions/list_reassignments.py +35 -0
- kafka/cli/admin/topics/__init__.py +10 -0
- kafka/cli/admin/topics/create.py +13 -0
- kafka/cli/admin/topics/delete.py +19 -0
- kafka/cli/admin/topics/describe.py +18 -0
- kafka/cli/admin/topics/list.py +11 -0
- kafka/cli/admin/transactions/__init__.py +17 -0
- kafka/cli/admin/transactions/abort.py +38 -0
- kafka/cli/admin/transactions/describe.py +24 -0
- kafka/cli/admin/transactions/describe_producers.py +29 -0
- kafka/cli/admin/transactions/find_hanging.py +26 -0
- kafka/cli/admin/transactions/list.py +37 -0
- kafka/cli/admin/users/__init__.py +8 -0
- kafka/cli/admin/users/alter_user_scram_credentials.py +34 -0
- kafka/cli/admin/users/describe_user_scram_credentials.py +15 -0
- kafka/cli/common.py +95 -0
- kafka/cli/consumer/__init__.py +63 -0
- kafka/cli/producer/__init__.py +57 -0
- kafka/cluster.py +824 -0
- kafka/codec.py +325 -0
- kafka/consumer/__init__.py +5 -0
- kafka/consumer/__main__.py +5 -0
- kafka/consumer/fetcher.py +2012 -0
- kafka/consumer/group.py +1347 -0
- kafka/consumer/subscription_state.py +897 -0
- kafka/coordinator/__init__.py +0 -0
- kafka/coordinator/assignors/__init__.py +0 -0
- kafka/coordinator/assignors/abstract.py +90 -0
- kafka/coordinator/assignors/cooperative_sticky.py +167 -0
- kafka/coordinator/assignors/range.py +81 -0
- kafka/coordinator/assignors/roundrobin.py +101 -0
- kafka/coordinator/assignors/sticky/StickyAssignorUserData.json +37 -0
- kafka/coordinator/assignors/sticky/__init__.py +0 -0
- kafka/coordinator/assignors/sticky/partition_movements.py +149 -0
- kafka/coordinator/assignors/sticky/sorted_set.py +63 -0
- kafka/coordinator/assignors/sticky/sticky_assignor.py +665 -0
- kafka/coordinator/assignors/sticky/user_data.py +8 -0
- kafka/coordinator/base.py +1215 -0
- kafka/coordinator/consumer.py +1224 -0
- kafka/coordinator/heartbeat.py +82 -0
- kafka/coordinator/subscription.py +34 -0
- kafka/errors.py +1004 -0
- kafka/future.py +166 -0
- kafka/metrics/__init__.py +13 -0
- kafka/metrics/compound_stat.py +33 -0
- kafka/metrics/dict_reporter.py +81 -0
- kafka/metrics/kafka_metric.py +36 -0
- kafka/metrics/measurable.py +27 -0
- kafka/metrics/measurable_stat.py +13 -0
- kafka/metrics/metric_config.py +33 -0
- kafka/metrics/metric_name.py +105 -0
- kafka/metrics/metrics.py +261 -0
- kafka/metrics/metrics_reporter.py +53 -0
- kafka/metrics/quota.py +41 -0
- kafka/metrics/stat.py +19 -0
- kafka/metrics/stats/__init__.py +15 -0
- kafka/metrics/stats/avg.py +24 -0
- kafka/metrics/stats/count.py +17 -0
- kafka/metrics/stats/histogram.py +99 -0
- kafka/metrics/stats/max_stat.py +17 -0
- kafka/metrics/stats/min_stat.py +19 -0
- kafka/metrics/stats/percentile.py +14 -0
- kafka/metrics/stats/percentiles.py +75 -0
- kafka/metrics/stats/rate.py +118 -0
- kafka/metrics/stats/sampled_stat.py +99 -0
- kafka/metrics/stats/sensor.py +136 -0
- kafka/metrics/stats/total.py +15 -0
- kafka/net/__init__.py +19 -0
- kafka/net/compat.py +165 -0
- kafka/net/connection.py +593 -0
- kafka/net/http_connect.py +144 -0
- kafka/net/inet.py +122 -0
- kafka/net/manager.py +451 -0
- kafka/net/metrics.py +149 -0
- kafka/net/sasl/__init__.py +32 -0
- kafka/net/sasl/abc.py +28 -0
- kafka/net/sasl/gssapi.py +95 -0
- kafka/net/sasl/msk.py +245 -0
- kafka/net/sasl/oauth.py +98 -0
- kafka/net/sasl/plain.py +42 -0
- kafka/net/sasl/scram.py +135 -0
- kafka/net/sasl/sspi.py +111 -0
- kafka/net/selector.py +644 -0
- kafka/net/socks5.py +262 -0
- kafka/net/transport.py +415 -0
- kafka/net/wakeup_notifier.py +72 -0
- kafka/partitioner/__init__.py +8 -0
- kafka/partitioner/abc.py +8 -0
- kafka/partitioner/default.py +89 -0
- kafka/partitioner/sticky.py +109 -0
- kafka/producer/__init__.py +5 -0
- kafka/producer/__main__.py +5 -0
- kafka/producer/future.py +101 -0
- kafka/producer/kafka.py +1123 -0
- kafka/producer/producer_batch.py +192 -0
- kafka/producer/record_accumulator.py +647 -0
- kafka/producer/sender.py +884 -0
- kafka/producer/transaction_manager.py +1326 -0
- kafka/protocol/__init__.py +0 -0
- kafka/protocol/admin/__init__.py +29 -0
- kafka/protocol/admin/acl.py +83 -0
- kafka/protocol/admin/acl.pyi +375 -0
- kafka/protocol/admin/client_quotas.py +14 -0
- kafka/protocol/admin/client_quotas.pyi +265 -0
- kafka/protocol/admin/cluster.py +31 -0
- kafka/protocol/admin/cluster.pyi +620 -0
- kafka/protocol/admin/configs.py +22 -0
- kafka/protocol/admin/configs.pyi +437 -0
- kafka/protocol/admin/groups.py +24 -0
- kafka/protocol/admin/groups.pyi +261 -0
- kafka/protocol/admin/topics.py +53 -0
- kafka/protocol/admin/topics.pyi +982 -0
- kafka/protocol/admin/transactions.py +18 -0
- kafka/protocol/admin/transactions.pyi +311 -0
- kafka/protocol/admin/users.py +14 -0
- kafka/protocol/admin/users.pyi +223 -0
- kafka/protocol/api_data.py +125 -0
- kafka/protocol/api_header.py +55 -0
- kafka/protocol/api_key.py +97 -0
- kafka/protocol/api_message.py +277 -0
- kafka/protocol/broker_version_data.py +246 -0
- kafka/protocol/consumer/__init__.py +13 -0
- kafka/protocol/consumer/fetch.py +16 -0
- kafka/protocol/consumer/fetch.pyi +298 -0
- kafka/protocol/consumer/group.py +38 -0
- kafka/protocol/consumer/group.pyi +824 -0
- kafka/protocol/consumer/metadata.py +30 -0
- kafka/protocol/consumer/metadata.pyi +89 -0
- kafka/protocol/consumer/offsets.py +75 -0
- kafka/protocol/consumer/offsets.pyi +288 -0
- kafka/protocol/data_container.py +166 -0
- kafka/protocol/frame.py +30 -0
- kafka/protocol/generate_stubs.py +468 -0
- kafka/protocol/metadata/__init__.py +10 -0
- kafka/protocol/metadata/api_versions.py +41 -0
- kafka/protocol/metadata/api_versions.pyi +128 -0
- kafka/protocol/metadata/find_coordinator.py +19 -0
- kafka/protocol/metadata/find_coordinator.pyi +105 -0
- kafka/protocol/metadata/metadata.py +34 -0
- kafka/protocol/metadata/metadata.pyi +160 -0
- kafka/protocol/old/__init__.py +0 -0
- kafka/protocol/old/abstract.py +17 -0
- kafka/protocol/old/add_offsets_to_txn.py +54 -0
- kafka/protocol/old/add_partitions_to_txn.py +71 -0
- kafka/protocol/old/admin.py +1086 -0
- kafka/protocol/old/api.py +205 -0
- kafka/protocol/old/api_versions.py +133 -0
- kafka/protocol/old/commit.py +355 -0
- kafka/protocol/old/consumer_protocol.py +36 -0
- kafka/protocol/old/end_txn.py +53 -0
- kafka/protocol/old/fetch.py +408 -0
- kafka/protocol/old/find_coordinator.py +72 -0
- kafka/protocol/old/group.py +451 -0
- kafka/protocol/old/init_producer_id.py +42 -0
- kafka/protocol/old/list_offsets.py +186 -0
- kafka/protocol/old/metadata.py +290 -0
- kafka/protocol/old/offset_for_leader_epoch.py +133 -0
- kafka/protocol/old/produce.py +247 -0
- kafka/protocol/old/sasl_authenticate.py +38 -0
- kafka/protocol/old/sasl_handshake.py +39 -0
- kafka/protocol/old/struct.py +87 -0
- kafka/protocol/old/txn_offset_commit.py +73 -0
- kafka/protocol/old/types.py +440 -0
- kafka/protocol/parser.py +191 -0
- kafka/protocol/producer/__init__.py +7 -0
- kafka/protocol/producer/produce.py +17 -0
- kafka/protocol/producer/produce.pyi +197 -0
- kafka/protocol/producer/transaction.py +30 -0
- kafka/protocol/producer/transaction.pyi +663 -0
- kafka/protocol/sasl.py +52 -0
- kafka/protocol/sasl.pyi +126 -0
- kafka/protocol/schemas/__init__.py +7 -0
- kafka/protocol/schemas/fields/__init__.py +7 -0
- kafka/protocol/schemas/fields/array.py +127 -0
- kafka/protocol/schemas/fields/base.py +156 -0
- kafka/protocol/schemas/fields/codecs/__init__.py +12 -0
- kafka/protocol/schemas/fields/codecs/encode_buffer.py +82 -0
- kafka/protocol/schemas/fields/codecs/tagged_fields.py +109 -0
- kafka/protocol/schemas/fields/codecs/types.py +505 -0
- kafka/protocol/schemas/fields/codegen.py +40 -0
- kafka/protocol/schemas/fields/simple.py +127 -0
- kafka/protocol/schemas/fields/struct.py +357 -0
- kafka/protocol/schemas/fields/struct_array.py +142 -0
- kafka/protocol/schemas/load_json.py +42 -0
- kafka/protocol/schemas/resources/AddOffsetsToTxnRequest.json +40 -0
- kafka/protocol/schemas/resources/AddOffsetsToTxnResponse.json +35 -0
- kafka/protocol/schemas/resources/AddPartitionsToTxnRequest.json +65 -0
- kafka/protocol/schemas/resources/AddPartitionsToTxnResponse.json +60 -0
- kafka/protocol/schemas/resources/AlterClientQuotasRequest.json +47 -0
- kafka/protocol/schemas/resources/AlterClientQuotasResponse.json +41 -0
- kafka/protocol/schemas/resources/AlterConfigsRequest.json +43 -0
- kafka/protocol/schemas/resources/AlterConfigsResponse.json +39 -0
- kafka/protocol/schemas/resources/AlterPartitionReassignmentsRequest.json +42 -0
- kafka/protocol/schemas/resources/AlterPartitionReassignmentsResponse.json +47 -0
- kafka/protocol/schemas/resources/AlterReplicaLogDirsRequest.json +41 -0
- kafka/protocol/schemas/resources/AlterReplicaLogDirsResponse.json +41 -0
- kafka/protocol/schemas/resources/AlterUserScramCredentialsRequest.json +45 -0
- kafka/protocol/schemas/resources/AlterUserScramCredentialsResponse.json +35 -0
- kafka/protocol/schemas/resources/ApiVersionsRequest.json +34 -0
- kafka/protocol/schemas/resources/ApiVersionsResponse.json +79 -0
- kafka/protocol/schemas/resources/ConsumerProtocolAssignment.json +42 -0
- kafka/protocol/schemas/resources/ConsumerProtocolSubscription.json +49 -0
- kafka/protocol/schemas/resources/CreateAclsRequest.json +46 -0
- kafka/protocol/schemas/resources/CreateAclsResponse.json +37 -0
- kafka/protocol/schemas/resources/CreatePartitionsRequest.json +47 -0
- kafka/protocol/schemas/resources/CreatePartitionsResponse.json +41 -0
- kafka/protocol/schemas/resources/CreateTopicsRequest.json +65 -0
- kafka/protocol/schemas/resources/CreateTopicsResponse.json +72 -0
- kafka/protocol/schemas/resources/DeleteAclsRequest.json +46 -0
- kafka/protocol/schemas/resources/DeleteAclsResponse.json +59 -0
- kafka/protocol/schemas/resources/DeleteGroupsRequest.json +30 -0
- kafka/protocol/schemas/resources/DeleteGroupsResponse.json +36 -0
- kafka/protocol/schemas/resources/DeleteRecordsRequest.json +42 -0
- kafka/protocol/schemas/resources/DeleteRecordsResponse.json +43 -0
- kafka/protocol/schemas/resources/DeleteTopicsRequest.json +43 -0
- kafka/protocol/schemas/resources/DeleteTopicsResponse.json +52 -0
- kafka/protocol/schemas/resources/DescribeAclsRequest.json +43 -0
- kafka/protocol/schemas/resources/DescribeAclsResponse.json +55 -0
- kafka/protocol/schemas/resources/DescribeClientQuotasRequest.json +37 -0
- kafka/protocol/schemas/resources/DescribeClientQuotasResponse.json +47 -0
- kafka/protocol/schemas/resources/DescribeClusterRequest.json +35 -0
- kafka/protocol/schemas/resources/DescribeClusterResponse.json +56 -0
- kafka/protocol/schemas/resources/DescribeConfigsRequest.json +42 -0
- kafka/protocol/schemas/resources/DescribeConfigsResponse.json +69 -0
- kafka/protocol/schemas/resources/DescribeGroupsRequest.json +38 -0
- kafka/protocol/schemas/resources/DescribeGroupsResponse.json +74 -0
- kafka/protocol/schemas/resources/DescribeLogDirsRequest.json +38 -0
- kafka/protocol/schemas/resources/DescribeLogDirsResponse.json +65 -0
- kafka/protocol/schemas/resources/DescribeProducersRequest.json +32 -0
- kafka/protocol/schemas/resources/DescribeProducersResponse.json +55 -0
- kafka/protocol/schemas/resources/DescribeQuorumRequest.json +39 -0
- kafka/protocol/schemas/resources/DescribeQuorumResponse.json +82 -0
- kafka/protocol/schemas/resources/DescribeTopicPartitionsRequest.json +40 -0
- kafka/protocol/schemas/resources/DescribeTopicPartitionsResponse.json +66 -0
- kafka/protocol/schemas/resources/DescribeTransactionsRequest.json +27 -0
- kafka/protocol/schemas/resources/DescribeTransactionsResponse.json +52 -0
- kafka/protocol/schemas/resources/DescribeUserScramCredentialsRequest.json +30 -0
- kafka/protocol/schemas/resources/DescribeUserScramCredentialsResponse.json +45 -0
- kafka/protocol/schemas/resources/ElectLeadersRequest.json +41 -0
- kafka/protocol/schemas/resources/ElectLeadersResponse.json +45 -0
- kafka/protocol/schemas/resources/EndTxnRequest.json +43 -0
- kafka/protocol/schemas/resources/EndTxnResponse.json +41 -0
- kafka/protocol/schemas/resources/FetchRequest.json +125 -0
- kafka/protocol/schemas/resources/FetchResponse.json +124 -0
- kafka/protocol/schemas/resources/FindCoordinatorRequest.json +43 -0
- kafka/protocol/schemas/resources/FindCoordinatorResponse.json +58 -0
- kafka/protocol/schemas/resources/HeartbeatRequest.json +39 -0
- kafka/protocol/schemas/resources/HeartbeatResponse.json +35 -0
- kafka/protocol/schemas/resources/IncrementalAlterConfigsRequest.json +44 -0
- kafka/protocol/schemas/resources/IncrementalAlterConfigsResponse.json +38 -0
- kafka/protocol/schemas/resources/InitProducerIdRequest.json +50 -0
- kafka/protocol/schemas/resources/InitProducerIdResponse.json +47 -0
- kafka/protocol/schemas/resources/JoinGroupRequest.json +63 -0
- kafka/protocol/schemas/resources/JoinGroupResponse.json +69 -0
- kafka/protocol/schemas/resources/LeaveGroupRequest.json +47 -0
- kafka/protocol/schemas/resources/LeaveGroupResponse.json +47 -0
- kafka/protocol/schemas/resources/ListConfigResourcesRequest.json +31 -0
- kafka/protocol/schemas/resources/ListConfigResourcesResponse.json +37 -0
- kafka/protocol/schemas/resources/ListGroupsRequest.json +36 -0
- kafka/protocol/schemas/resources/ListGroupsResponse.json +49 -0
- kafka/protocol/schemas/resources/ListOffsetsRequest.json +72 -0
- kafka/protocol/schemas/resources/ListOffsetsResponse.json +71 -0
- kafka/protocol/schemas/resources/ListPartitionReassignmentsRequest.json +34 -0
- kafka/protocol/schemas/resources/ListPartitionReassignmentsResponse.json +46 -0
- kafka/protocol/schemas/resources/ListTransactionsRequest.json +40 -0
- kafka/protocol/schemas/resources/ListTransactionsResponse.json +42 -0
- kafka/protocol/schemas/resources/MetadataRequest.json +56 -0
- kafka/protocol/schemas/resources/MetadataResponse.json +101 -0
- kafka/protocol/schemas/resources/OffsetCommitRequest.json +76 -0
- kafka/protocol/schemas/resources/OffsetCommitResponse.json +71 -0
- kafka/protocol/schemas/resources/OffsetDeleteRequest.json +39 -0
- kafka/protocol/schemas/resources/OffsetDeleteResponse.json +42 -0
- kafka/protocol/schemas/resources/OffsetFetchRequest.json +76 -0
- kafka/protocol/schemas/resources/OffsetFetchResponse.json +107 -0
- kafka/protocol/schemas/resources/OffsetForLeaderEpochRequest.json +52 -0
- kafka/protocol/schemas/resources/OffsetForLeaderEpochResponse.json +51 -0
- kafka/protocol/schemas/resources/ProduceRequest.json +73 -0
- kafka/protocol/schemas/resources/ProduceResponse.json +96 -0
- kafka/protocol/schemas/resources/RequestHeader.json +44 -0
- kafka/protocol/schemas/resources/ResponseHeader.json +26 -0
- kafka/protocol/schemas/resources/SaslAuthenticateRequest.json +29 -0
- kafka/protocol/schemas/resources/SaslAuthenticateResponse.json +34 -0
- kafka/protocol/schemas/resources/SaslHandshakeRequest.json +31 -0
- kafka/protocol/schemas/resources/SaslHandshakeResponse.json +32 -0
- kafka/protocol/schemas/resources/SyncGroupRequest.json +56 -0
- kafka/protocol/schemas/resources/SyncGroupResponse.json +46 -0
- kafka/protocol/schemas/resources/TxnOffsetCommitRequest.json +68 -0
- kafka/protocol/schemas/resources/TxnOffsetCommitResponse.json +47 -0
- kafka/protocol/schemas/resources/UpdateFeaturesRequest.json +43 -0
- kafka/protocol/schemas/resources/UpdateFeaturesResponse.json +39 -0
- kafka/protocol/schemas/resources/WriteTxnMarkersRequest.json +49 -0
- kafka/protocol/schemas/resources/WriteTxnMarkersResponse.json +45 -0
- kafka/protocol/schemas/resources/__init__.py +0 -0
- kafka/record/__init__.py +3 -0
- kafka/record/_crc32c.py +161 -0
- kafka/record/abc.py +144 -0
- kafka/record/default_records.py +782 -0
- kafka/record/legacy_records.py +587 -0
- kafka/record/memory_records.py +255 -0
- kafka/record/util.py +135 -0
- kafka/serializer/__init__.py +4 -0
- kafka/serializer/abstract.py +20 -0
- kafka/serializer/default.py +16 -0
- kafka/serializer/json.py +17 -0
- kafka/serializer/wrapper.py +21 -0
- kafka/structs.py +69 -0
- kafka/util.py +159 -0
- kafka/vendor/__init__.py +0 -0
- kafka/version.py +1 -0
- kafka_python-3.0.0.dist-info/METADATA +319 -0
- kafka_python-3.0.0.dist-info/RECORD +373 -0
- kafka_python-3.0.0.dist-info/WHEEL +5 -0
- kafka_python-3.0.0.dist-info/entry_points.txt +2 -0
- kafka_python-3.0.0.dist-info/licenses/LICENSE +202 -0
- kafka_python-3.0.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
// Licensed to the Apache Software Foundation (ASF) under one or more
|
|
2
|
+
// contributor license agreements. See the NOTICE file distributed with
|
|
3
|
+
// this work for additional information regarding copyright ownership.
|
|
4
|
+
// The ASF licenses this file to You under the Apache License, Version 2.0
|
|
5
|
+
// (the "License"); you may not use this file except in compliance with
|
|
6
|
+
// the License. You may obtain a copy of the License at
|
|
7
|
+
//
|
|
8
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
//
|
|
10
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
// See the License for the specific language governing permissions and
|
|
14
|
+
// limitations under the License.
|
|
15
|
+
|
|
16
|
+
{
|
|
17
|
+
"apiKey": 16,
|
|
18
|
+
"type": "response",
|
|
19
|
+
"name": "ListGroupsResponse",
|
|
20
|
+
// Version 1 adds the throttle time.
|
|
21
|
+
//
|
|
22
|
+
// Starting in version 2, on quota violation, brokers send out
|
|
23
|
+
// responses before throttling.
|
|
24
|
+
//
|
|
25
|
+
// Version 3 is the first flexible version.
|
|
26
|
+
//
|
|
27
|
+
// Version 4 adds the GroupState field (KIP-518).
|
|
28
|
+
//
|
|
29
|
+
// Version 5 adds the GroupType field (KIP-848).
|
|
30
|
+
"validVersions": "0-5",
|
|
31
|
+
"flexibleVersions": "3+",
|
|
32
|
+
"fields": [
|
|
33
|
+
{ "name": "ThrottleTimeMs", "type": "int32", "versions": "1+", "ignorable": true,
|
|
34
|
+
"about": "The duration in milliseconds for which the request was throttled due to a quota violation, or zero if the request did not violate any quota." },
|
|
35
|
+
{ "name": "ErrorCode", "type": "int16", "versions": "0+",
|
|
36
|
+
"about": "The error code, or 0 if there was no error." },
|
|
37
|
+
{ "name": "Groups", "type": "[]ListedGroup", "versions": "0+",
|
|
38
|
+
"about": "Each group in the response.", "fields": [
|
|
39
|
+
{ "name": "GroupId", "type": "string", "versions": "0+", "entityType": "groupId",
|
|
40
|
+
"about": "The group ID." },
|
|
41
|
+
{ "name": "ProtocolType", "type": "string", "versions": "0+",
|
|
42
|
+
"about": "The group protocol type." },
|
|
43
|
+
{ "name": "GroupState", "type": "string", "versions": "4+", "ignorable": true,
|
|
44
|
+
"about": "The group state name." },
|
|
45
|
+
{ "name": "GroupType", "type": "string", "versions": "5+", "ignorable": true,
|
|
46
|
+
"about": "The group type name." }
|
|
47
|
+
]}
|
|
48
|
+
]
|
|
49
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
// Licensed to the Apache Software Foundation (ASF) under one or more
|
|
2
|
+
// contributor license agreements. See the NOTICE file distributed with
|
|
3
|
+
// this work for additional information regarding copyright ownership.
|
|
4
|
+
// The ASF licenses this file to You under the Apache License, Version 2.0
|
|
5
|
+
// (the "License"); you may not use this file except in compliance with
|
|
6
|
+
// the License. You may obtain a copy of the License at
|
|
7
|
+
//
|
|
8
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
//
|
|
10
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
// See the License for the specific language governing permissions and
|
|
14
|
+
// limitations under the License.
|
|
15
|
+
|
|
16
|
+
{
|
|
17
|
+
"apiKey": 2,
|
|
18
|
+
"type": "request",
|
|
19
|
+
"listeners": ["broker"],
|
|
20
|
+
"name": "ListOffsetsRequest",
|
|
21
|
+
// Version 0 was removed in Apache Kafka 4.0, Version 1 is the new baseline.
|
|
22
|
+
//
|
|
23
|
+
// Version 1 removes MaxNumOffsets. From this version forward, only a single
|
|
24
|
+
// offset can be returned.
|
|
25
|
+
//
|
|
26
|
+
// Version 2 adds the isolation level, which is used for transactional reads.
|
|
27
|
+
//
|
|
28
|
+
// Version 3 is the same as version 2.
|
|
29
|
+
//
|
|
30
|
+
// Version 4 adds the current leader epoch, which is used for fencing.
|
|
31
|
+
//
|
|
32
|
+
// Version 5 is the same as version 4.
|
|
33
|
+
//
|
|
34
|
+
// Version 6 enables flexible versions.
|
|
35
|
+
//
|
|
36
|
+
// Version 7 enables listing offsets by max timestamp (KIP-734).
|
|
37
|
+
//
|
|
38
|
+
// Version 8 enables listing offsets by local log start offset (KIP-405).
|
|
39
|
+
//
|
|
40
|
+
// Version 9 enables listing offsets by last tiered offset (KIP-1005).
|
|
41
|
+
//
|
|
42
|
+
// Version 10 enables async remote list offsets support (KIP-1075)
|
|
43
|
+
//
|
|
44
|
+
// Version 11 enables listing offsets by earliest pending upload offset (KIP-1023)
|
|
45
|
+
"validVersions": "1-11",
|
|
46
|
+
"flexibleVersions": "6+",
|
|
47
|
+
"latestVersionUnstable": false,
|
|
48
|
+
"fields": [
|
|
49
|
+
{ "name": "ReplicaId", "type": "int32", "versions": "0+", "entityType": "brokerId",
|
|
50
|
+
"about": "The broker ID of the requester, or -1 if this request is being made by a normal consumer." },
|
|
51
|
+
{ "name": "IsolationLevel", "type": "int8", "versions": "2+",
|
|
52
|
+
"about": "This setting controls the visibility of transactional records. Using READ_UNCOMMITTED (isolation_level = 0) makes all records visible. With READ_COMMITTED (isolation_level = 1), non-transactional and COMMITTED transactional records are visible. To be more concrete, READ_COMMITTED returns all data from offsets smaller than the current LSO (last stable offset), and enables the inclusion of the list of aborted transactions in the result, which allows consumers to discard ABORTED transactional records." },
|
|
53
|
+
{ "name": "Topics", "type": "[]ListOffsetsTopic", "versions": "0+",
|
|
54
|
+
"about": "Each topic in the request.", "fields": [
|
|
55
|
+
{ "name": "Name", "type": "string", "versions": "0+", "entityType": "topicName",
|
|
56
|
+
"about": "The topic name." },
|
|
57
|
+
{ "name": "Partitions", "type": "[]ListOffsetsPartition", "versions": "0+",
|
|
58
|
+
"about": "Each partition in the request.", "fields": [
|
|
59
|
+
{ "name": "PartitionIndex", "type": "int32", "versions": "0+",
|
|
60
|
+
"about": "The partition index." },
|
|
61
|
+
{ "name": "CurrentLeaderEpoch", "type": "int32", "versions": "4+", "default": "-1", "ignorable": true,
|
|
62
|
+
"about": "The current leader epoch." },
|
|
63
|
+
{ "name": "Timestamp", "type": "int64", "versions": "0+",
|
|
64
|
+
"about": "The current timestamp." },
|
|
65
|
+
{ "name": "MaxNumOffsets", "type": "int32", "versions": "0", "default": "1",
|
|
66
|
+
"about": "The maximum number of offsets to report." }
|
|
67
|
+
]}
|
|
68
|
+
]},
|
|
69
|
+
{ "name": "TimeoutMs", "type": "int32", "versions": "10+", "ignorable": true,
|
|
70
|
+
"about": "The timeout to await a response in milliseconds for requests that require reading from remote storage for topics enabled with tiered storage." }
|
|
71
|
+
]
|
|
72
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
// Licensed to the Apache Software Foundation (ASF) under one or more
|
|
2
|
+
// contributor license agreements. See the NOTICE file distributed with
|
|
3
|
+
// this work for additional information regarding copyright ownership.
|
|
4
|
+
// The ASF licenses this file to You under the Apache License, Version 2.0
|
|
5
|
+
// (the "License"); you may not use this file except in compliance with
|
|
6
|
+
// the License. You may obtain a copy of the License at
|
|
7
|
+
//
|
|
8
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
//
|
|
10
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
// See the License for the specific language governing permissions and
|
|
14
|
+
// limitations under the License.
|
|
15
|
+
|
|
16
|
+
{
|
|
17
|
+
"apiKey": 2,
|
|
18
|
+
"type": "response",
|
|
19
|
+
"name": "ListOffsetsResponse",
|
|
20
|
+
// Version 0 was removed in Apache Kafka 4.0, Version 1 is the new baseline.
|
|
21
|
+
//
|
|
22
|
+
// Version 1 removes the offsets array in favor of returning a single offset.
|
|
23
|
+
// Version 1 also adds the timestamp associated with the returned offset.
|
|
24
|
+
//
|
|
25
|
+
// Version 2 adds the throttle time.
|
|
26
|
+
//
|
|
27
|
+
// Starting in version 3, on quota violation, brokers send out responses before throttling.
|
|
28
|
+
//
|
|
29
|
+
// Version 4 adds the leader epoch, which is used for fencing.
|
|
30
|
+
//
|
|
31
|
+
// Version 5 adds a new error code, OFFSET_NOT_AVAILABLE.
|
|
32
|
+
//
|
|
33
|
+
// Version 6 enables flexible versions.
|
|
34
|
+
//
|
|
35
|
+
// Version 7 is the same as version 6 (KIP-734).
|
|
36
|
+
//
|
|
37
|
+
// Version 8 enables listing offsets by local log start offset.
|
|
38
|
+
// This is the earliest log start offset in the local log. (KIP-405).
|
|
39
|
+
//
|
|
40
|
+
// Version 9 enables listing offsets by last tiered offset (KIP-1005).
|
|
41
|
+
//
|
|
42
|
+
// Version 10 enables async remote list offsets support (KIP-1075)
|
|
43
|
+
//
|
|
44
|
+
// Version 11 enables listing offsets by earliest pending upload offset (KIP-1023)
|
|
45
|
+
"validVersions": "1-11",
|
|
46
|
+
"flexibleVersions": "6+",
|
|
47
|
+
"fields": [
|
|
48
|
+
{ "name": "ThrottleTimeMs", "type": "int32", "versions": "2+", "ignorable": true,
|
|
49
|
+
"about": "The duration in milliseconds for which the request was throttled due to a quota violation, or zero if the request did not violate any quota." },
|
|
50
|
+
{ "name": "Topics", "type": "[]ListOffsetsTopicResponse", "versions": "0+",
|
|
51
|
+
"about": "Each topic in the response.", "fields": [
|
|
52
|
+
{ "name": "Name", "type": "string", "versions": "0+", "entityType": "topicName",
|
|
53
|
+
"about": "The topic name." },
|
|
54
|
+
{ "name": "Partitions", "type": "[]ListOffsetsPartitionResponse", "versions": "0+",
|
|
55
|
+
"about": "Each partition in the response.", "fields": [
|
|
56
|
+
{ "name": "PartitionIndex", "type": "int32", "versions": "0+",
|
|
57
|
+
"about": "The partition index." },
|
|
58
|
+
{ "name": "ErrorCode", "type": "int16", "versions": "0+",
|
|
59
|
+
"about": "The partition error code, or 0 if there was no error." },
|
|
60
|
+
{ "name": "OldStyleOffsets", "type": "[]int64", "versions": "0", "ignorable": false,
|
|
61
|
+
"about": "The result offsets." },
|
|
62
|
+
{ "name": "Timestamp", "type": "int64", "versions": "1+", "default": "-1", "ignorable": false,
|
|
63
|
+
"about": "The timestamp associated with the returned offset." },
|
|
64
|
+
{ "name": "Offset", "type": "int64", "versions": "1+", "default": "-1", "ignorable": false,
|
|
65
|
+
"about": "The returned offset." },
|
|
66
|
+
{ "name": "LeaderEpoch", "type": "int32", "versions": "4+", "default": "-1",
|
|
67
|
+
"about": "The leader epoch associated with the returned offset."}
|
|
68
|
+
]}
|
|
69
|
+
]}
|
|
70
|
+
]
|
|
71
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
// Licensed to the Apache Software Foundation (ASF) under one or more
|
|
2
|
+
// contributor license agreements. See the NOTICE file distributed with
|
|
3
|
+
// this work for additional information regarding copyright ownership.
|
|
4
|
+
// The ASF licenses this file to You under the Apache License, Version 2.0
|
|
5
|
+
// (the "License"); you may not use this file except in compliance with
|
|
6
|
+
// the License. You may obtain a copy of the License at
|
|
7
|
+
//
|
|
8
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
//
|
|
10
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
// See the License for the specific language governing permissions and
|
|
14
|
+
// limitations under the License.
|
|
15
|
+
|
|
16
|
+
{
|
|
17
|
+
"apiKey": 46,
|
|
18
|
+
"type": "request",
|
|
19
|
+
"listeners": ["broker", "controller"],
|
|
20
|
+
"name": "ListPartitionReassignmentsRequest",
|
|
21
|
+
"validVersions": "0",
|
|
22
|
+
"flexibleVersions": "0+",
|
|
23
|
+
"fields": [
|
|
24
|
+
{ "name": "TimeoutMs", "type": "int32", "versions": "0+", "default": "60000",
|
|
25
|
+
"about": "The time in ms to wait for the request to complete." },
|
|
26
|
+
{ "name": "Topics", "type": "[]ListPartitionReassignmentsTopics", "versions": "0+", "nullableVersions": "0+", "default": "null",
|
|
27
|
+
"about": "The topics to list partition reassignments for, or null to list everything.", "fields": [
|
|
28
|
+
{ "name": "Name", "type": "string", "versions": "0+", "entityType": "topicName",
|
|
29
|
+
"about": "The topic name." },
|
|
30
|
+
{ "name": "PartitionIndexes", "type": "[]int32", "versions": "0+",
|
|
31
|
+
"about": "The partitions to list partition reassignments for." }
|
|
32
|
+
]}
|
|
33
|
+
]
|
|
34
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
// Licensed to the Apache Software Foundation (ASF) under one or more
|
|
2
|
+
// contributor license agreements. See the NOTICE file distributed with
|
|
3
|
+
// this work for additional information regarding copyright ownership.
|
|
4
|
+
// The ASF licenses this file to You under the Apache License, Version 2.0
|
|
5
|
+
// (the "License"); you may not use this file except in compliance with
|
|
6
|
+
// the License. You may obtain a copy of the License at
|
|
7
|
+
//
|
|
8
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
//
|
|
10
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
// See the License for the specific language governing permissions and
|
|
14
|
+
// limitations under the License.
|
|
15
|
+
|
|
16
|
+
{
|
|
17
|
+
"apiKey": 46,
|
|
18
|
+
"type": "response",
|
|
19
|
+
"name": "ListPartitionReassignmentsResponse",
|
|
20
|
+
"validVersions": "0",
|
|
21
|
+
"flexibleVersions": "0+",
|
|
22
|
+
"fields": [
|
|
23
|
+
{ "name": "ThrottleTimeMs", "type": "int32", "versions": "0+",
|
|
24
|
+
"about": "The duration in milliseconds for which the request was throttled due to a quota violation, or zero if the request did not violate any quota." },
|
|
25
|
+
{ "name": "ErrorCode", "type": "int16", "versions": "0+",
|
|
26
|
+
"about": "The top-level error code, or 0 if there was no error." },
|
|
27
|
+
{ "name": "ErrorMessage", "type": "string", "versions": "0+", "nullableVersions": "0+",
|
|
28
|
+
"about": "The top-level error message, or null if there was no error." },
|
|
29
|
+
{ "name": "Topics", "type": "[]OngoingTopicReassignment", "versions": "0+",
|
|
30
|
+
"about": "The ongoing reassignments for each topic.", "fields": [
|
|
31
|
+
{ "name": "Name", "type": "string", "versions": "0+", "entityType": "topicName",
|
|
32
|
+
"about": "The topic name." },
|
|
33
|
+
{ "name": "Partitions", "type": "[]OngoingPartitionReassignment", "versions": "0+",
|
|
34
|
+
"about": "The ongoing reassignments for each partition.", "fields": [
|
|
35
|
+
{ "name": "PartitionIndex", "type": "int32", "versions": "0+",
|
|
36
|
+
"about": "The index of the partition." },
|
|
37
|
+
{ "name": "Replicas", "type": "[]int32", "versions": "0+", "entityType": "brokerId",
|
|
38
|
+
"about": "The current replica set." },
|
|
39
|
+
{ "name": "AddingReplicas", "type": "[]int32", "versions": "0+", "entityType": "brokerId",
|
|
40
|
+
"about": "The set of replicas we are currently adding." },
|
|
41
|
+
{ "name": "RemovingReplicas", "type": "[]int32", "versions": "0+", "entityType": "brokerId",
|
|
42
|
+
"about": "The set of replicas we are currently removing." }
|
|
43
|
+
]}
|
|
44
|
+
]}
|
|
45
|
+
]
|
|
46
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
// Licensed to the Apache Software Foundation (ASF) under one or more
|
|
2
|
+
// contributor license agreements. See the NOTICE file distributed with
|
|
3
|
+
// this work for additional information regarding copyright ownership.
|
|
4
|
+
// The ASF licenses this file to You under the Apache License, Version 2.0
|
|
5
|
+
// (the "License"); you may not use this file except in compliance with
|
|
6
|
+
// the License. You may obtain a copy of the License at
|
|
7
|
+
//
|
|
8
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
//
|
|
10
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
// See the License for the specific language governing permissions and
|
|
14
|
+
// limitations under the License.
|
|
15
|
+
|
|
16
|
+
{
|
|
17
|
+
"apiKey": 66,
|
|
18
|
+
"type": "request",
|
|
19
|
+
"listeners": ["broker"],
|
|
20
|
+
"name": "ListTransactionsRequest",
|
|
21
|
+
// Version 1: adds DurationFilter to list transactions older than specified duration
|
|
22
|
+
|
|
23
|
+
// Version 2: adds TransactionalIdPattern to list transactions with the same pattern(KIP-1152)
|
|
24
|
+
"validVersions": "0-2",
|
|
25
|
+
"flexibleVersions": "0+",
|
|
26
|
+
"fields": [
|
|
27
|
+
{ "name": "StateFilters", "type": "[]string", "versions": "0+",
|
|
28
|
+
"about": "The transaction states to filter by: if empty, all transactions are returned; if non-empty, then only transactions matching one of the filtered states will be returned."
|
|
29
|
+
},
|
|
30
|
+
{ "name": "ProducerIdFilters", "type": "[]int64", "versions": "0+", "entityType": "producerId",
|
|
31
|
+
"about": "The producerIds to filter by: if empty, all transactions will be returned; if non-empty, only transactions which match one of the filtered producerIds will be returned."
|
|
32
|
+
},
|
|
33
|
+
{ "name": "DurationFilter", "type": "int64", "versions": "1+", "default": -1,
|
|
34
|
+
"about": "Duration (in millis) to filter by: if < 0, all transactions will be returned; otherwise, only transactions running longer than this duration will be returned."
|
|
35
|
+
},
|
|
36
|
+
{ "name": "TransactionalIdPattern", "type": "string", "versions": "2+", "nullableVersions": "2+", "default": "null",
|
|
37
|
+
"about": "The transactional ID regular expression pattern to filter by: if it is empty or null, all transactions are returned; Otherwise then only the transactions matching the given regular expression will be returned."
|
|
38
|
+
}
|
|
39
|
+
]
|
|
40
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// Licensed to the Apache Software Foundation (ASF) under one or more
|
|
2
|
+
// contributor license agreements. See the NOTICE file distributed with
|
|
3
|
+
// this work for additional information regarding copyright ownership.
|
|
4
|
+
// The ASF licenses this file to You under the Apache License, Version 2.0
|
|
5
|
+
// (the "License"); you may not use this file except in compliance with
|
|
6
|
+
// the License. You may obtain a copy of the License at
|
|
7
|
+
//
|
|
8
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
//
|
|
10
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
// See the License for the specific language governing permissions and
|
|
14
|
+
// limitations under the License.
|
|
15
|
+
|
|
16
|
+
{
|
|
17
|
+
"apiKey": 66,
|
|
18
|
+
"type": "response",
|
|
19
|
+
"name": "ListTransactionsResponse",
|
|
20
|
+
// Version 1 is the same as version 0 (KIP-994).
|
|
21
|
+
|
|
22
|
+
// This API can return InvalidRegularExpression (KIP-1152).
|
|
23
|
+
"validVersions": "0-2",
|
|
24
|
+
"flexibleVersions": "0+",
|
|
25
|
+
"fields": [
|
|
26
|
+
{ "name": "ThrottleTimeMs", "type": "int32", "versions": "0+",
|
|
27
|
+
"about": "The duration in milliseconds for which the request was throttled due to a quota violation, or zero if the request did not violate any quota." },
|
|
28
|
+
{ "name": "ErrorCode", "type": "int16", "versions": "0+",
|
|
29
|
+
"about": "The error code, or 0 if there was no error." },
|
|
30
|
+
{ "name": "UnknownStateFilters", "type": "[]string", "versions": "0+",
|
|
31
|
+
"about": "Set of state filters provided in the request which were unknown to the transaction coordinator." },
|
|
32
|
+
{ "name": "TransactionStates", "type": "[]TransactionState", "versions": "0+",
|
|
33
|
+
"about": "The current state of the transaction for the transactional id.", "fields": [
|
|
34
|
+
{ "name": "TransactionalId", "type": "string", "versions": "0+", "entityType": "transactionalId",
|
|
35
|
+
"about": "The transactional id." },
|
|
36
|
+
{ "name": "ProducerId", "type": "int64", "versions": "0+", "entityType": "producerId",
|
|
37
|
+
"about": "The producer id." },
|
|
38
|
+
{ "name": "TransactionState", "type": "string", "versions": "0+",
|
|
39
|
+
"about": "The current transaction state of the producer." }
|
|
40
|
+
]}
|
|
41
|
+
]
|
|
42
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
// Licensed to the Apache Software Foundation (ASF) under one or more
|
|
2
|
+
// contributor license agreements. See the NOTICE file distributed with
|
|
3
|
+
// this work for additional information regarding copyright ownership.
|
|
4
|
+
// The ASF licenses this file to You under the Apache License, Version 2.0
|
|
5
|
+
// (the "License"); you may not use this file except in compliance with
|
|
6
|
+
// the License. You may obtain a copy of the License at
|
|
7
|
+
//
|
|
8
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
//
|
|
10
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
// See the License for the specific language governing permissions and
|
|
14
|
+
// limitations under the License.
|
|
15
|
+
|
|
16
|
+
{
|
|
17
|
+
"apiKey": 3,
|
|
18
|
+
"type": "request",
|
|
19
|
+
"listeners": ["broker"],
|
|
20
|
+
"name": "MetadataRequest",
|
|
21
|
+
"validVersions": "0-13",
|
|
22
|
+
"flexibleVersions": "9+",
|
|
23
|
+
"fields": [
|
|
24
|
+
// In version 0, an empty array indicates "request metadata for all topics." In version 1 and
|
|
25
|
+
// higher, an empty array indicates "request metadata for no topics," and a null array is used to
|
|
26
|
+
// indicate "request metadata for all topics."
|
|
27
|
+
//
|
|
28
|
+
// Version 2 and 3 are the same as version 1.
|
|
29
|
+
//
|
|
30
|
+
// Version 4 adds AllowAutoTopicCreation.
|
|
31
|
+
//
|
|
32
|
+
// Starting in version 8, authorized operations can be requested for cluster and topic resource.
|
|
33
|
+
//
|
|
34
|
+
// Version 9 is the first flexible version.
|
|
35
|
+
//
|
|
36
|
+
// Version 10 adds topicId and allows name field to be null. However, this functionality was not implemented on the server.
|
|
37
|
+
// Versions 10 and 11 should not use the topicId field or set topic name to null.
|
|
38
|
+
//
|
|
39
|
+
// Version 11 deprecates IncludeClusterAuthorizedOperations field. This is now exposed
|
|
40
|
+
// by the DescribeCluster API (KIP-700).
|
|
41
|
+
// Version 12 supports topic Id.
|
|
42
|
+
// Version 13 supports top-level error code in the response.
|
|
43
|
+
{ "name": "Topics", "type": "[]MetadataRequestTopic", "versions": "0+", "nullableVersions": "1+",
|
|
44
|
+
"about": "The topics to fetch metadata for.", "fields": [
|
|
45
|
+
{ "name": "TopicId", "type": "uuid", "versions": "10+", "ignorable": true, "about": "The topic id." },
|
|
46
|
+
{ "name": "Name", "type": "string", "versions": "0+", "entityType": "topicName", "nullableVersions": "10+",
|
|
47
|
+
"about": "The topic name." }
|
|
48
|
+
]},
|
|
49
|
+
{ "name": "AllowAutoTopicCreation", "type": "bool", "versions": "4+", "default": "true", "ignorable": false,
|
|
50
|
+
"about": "If this is true, the broker may auto-create topics that we requested which do not already exist, if it is configured to do so." },
|
|
51
|
+
{ "name": "IncludeClusterAuthorizedOperations", "type": "bool", "versions": "8-10",
|
|
52
|
+
"about": "Whether to include cluster authorized operations." },
|
|
53
|
+
{ "name": "IncludeTopicAuthorizedOperations", "type": "bool", "versions": "8+",
|
|
54
|
+
"about": "Whether to include topic authorized operations." }
|
|
55
|
+
]
|
|
56
|
+
}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
// Licensed to the Apache Software Foundation (ASF) under one or more
|
|
2
|
+
// contributor license agreements. See the NOTICE file distributed with
|
|
3
|
+
// this work for additional information regarding copyright ownership.
|
|
4
|
+
// The ASF licenses this file to You under the Apache License, Version 2.0
|
|
5
|
+
// (the "License"); you may not use this file except in compliance with
|
|
6
|
+
// the License. You may obtain a copy of the License at
|
|
7
|
+
//
|
|
8
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
//
|
|
10
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
// See the License for the specific language governing permissions and
|
|
14
|
+
// limitations under the License.
|
|
15
|
+
|
|
16
|
+
{
|
|
17
|
+
"apiKey": 3,
|
|
18
|
+
"type": "response",
|
|
19
|
+
"name": "MetadataResponse",
|
|
20
|
+
// Version 1 adds fields for the rack of each broker, the controller id, and whether or not the topic is internal.
|
|
21
|
+
//
|
|
22
|
+
// Version 2 adds the cluster ID field.
|
|
23
|
+
//
|
|
24
|
+
// Version 3 adds the throttle time.
|
|
25
|
+
//
|
|
26
|
+
// Version 4 is the same as version 3.
|
|
27
|
+
//
|
|
28
|
+
// Version 5 adds a per-partition offline_replicas field. This field specifies
|
|
29
|
+
// the list of replicas that are offline.
|
|
30
|
+
//
|
|
31
|
+
// Starting in version 6, on quota violation, brokers send out responses before throttling.
|
|
32
|
+
//
|
|
33
|
+
// Version 7 adds the leader epoch to the partition metadata.
|
|
34
|
+
//
|
|
35
|
+
// Starting in version 8, brokers can send authorized operations for topic and cluster.
|
|
36
|
+
//
|
|
37
|
+
// Version 9 is the first flexible version.
|
|
38
|
+
//
|
|
39
|
+
// Version 10 adds topicId.
|
|
40
|
+
//
|
|
41
|
+
// Version 11 deprecates ClusterAuthorizedOperations. This is now exposed
|
|
42
|
+
// by the DescribeCluster API (KIP-700).
|
|
43
|
+
// Version 12 supports topicId.
|
|
44
|
+
// Version 13 supports top-level error code in the response.
|
|
45
|
+
"validVersions": "0-13",
|
|
46
|
+
"flexibleVersions": "9+",
|
|
47
|
+
"fields": [
|
|
48
|
+
{ "name": "ThrottleTimeMs", "type": "int32", "versions": "3+", "ignorable": true,
|
|
49
|
+
"about": "The duration in milliseconds for which the request was throttled due to a quota violation, or zero if the request did not violate any quota." },
|
|
50
|
+
{ "name": "Brokers", "type": "[]MetadataResponseBroker", "versions": "0+",
|
|
51
|
+
"about": "A list of brokers present in the cluster.", "fields": [
|
|
52
|
+
{ "name": "NodeId", "type": "int32", "versions": "0+", "mapKey": true, "entityType": "brokerId",
|
|
53
|
+
"about": "The broker ID." },
|
|
54
|
+
{ "name": "Host", "type": "string", "versions": "0+",
|
|
55
|
+
"about": "The broker hostname." },
|
|
56
|
+
{ "name": "Port", "type": "int32", "versions": "0+",
|
|
57
|
+
"about": "The broker port." },
|
|
58
|
+
{ "name": "Rack", "type": "string", "versions": "1+", "nullableVersions": "1+", "ignorable": true, "default": "null",
|
|
59
|
+
"about": "The rack of the broker, or null if it has not been assigned to a rack." }
|
|
60
|
+
]},
|
|
61
|
+
{ "name": "ClusterId", "type": "string", "nullableVersions": "2+", "versions": "2+", "ignorable": true, "default": "null",
|
|
62
|
+
"about": "The cluster ID that responding broker belongs to." },
|
|
63
|
+
{ "name": "ControllerId", "type": "int32", "versions": "1+", "default": "-1", "ignorable": true, "entityType": "brokerId",
|
|
64
|
+
"about": "The ID of the controller broker." },
|
|
65
|
+
{ "name": "Topics", "type": "[]MetadataResponseTopic", "versions": "0+",
|
|
66
|
+
"about": "Each topic in the response.", "fields": [
|
|
67
|
+
{ "name": "ErrorCode", "type": "int16", "versions": "0+",
|
|
68
|
+
"about": "The topic error, or 0 if there was no error." },
|
|
69
|
+
{ "name": "Name", "type": "string", "versions": "0+", "mapKey": true, "entityType": "topicName", "nullableVersions": "12+",
|
|
70
|
+
"about": "The topic name. Null for non-existing topics queried by ID. This is never null when ErrorCode is zero. One of Name and TopicId is always populated." },
|
|
71
|
+
{ "name": "TopicId", "type": "uuid", "versions": "10+", "ignorable": true,
|
|
72
|
+
"about": "The topic id. Zero for non-existing topics queried by name. This is never zero when ErrorCode is zero. One of Name and TopicId is always populated." },
|
|
73
|
+
{ "name": "IsInternal", "type": "bool", "versions": "1+", "default": "false", "ignorable": true,
|
|
74
|
+
"about": "True if the topic is internal." },
|
|
75
|
+
{ "name": "Partitions", "type": "[]MetadataResponsePartition", "versions": "0+",
|
|
76
|
+
"about": "Each partition in the topic.", "fields": [
|
|
77
|
+
{ "name": "ErrorCode", "type": "int16", "versions": "0+",
|
|
78
|
+
"about": "The partition error, or 0 if there was no error." },
|
|
79
|
+
{ "name": "PartitionIndex", "type": "int32", "versions": "0+",
|
|
80
|
+
"about": "The partition index." },
|
|
81
|
+
{ "name": "LeaderId", "type": "int32", "versions": "0+", "entityType": "brokerId",
|
|
82
|
+
"about": "The ID of the leader broker." },
|
|
83
|
+
{ "name": "LeaderEpoch", "type": "int32", "versions": "7+", "default": "-1", "ignorable": true,
|
|
84
|
+
"about": "The leader epoch of this partition." },
|
|
85
|
+
{ "name": "ReplicaNodes", "type": "[]int32", "versions": "0+", "entityType": "brokerId",
|
|
86
|
+
"about": "The set of all nodes that host this partition." },
|
|
87
|
+
{ "name": "IsrNodes", "type": "[]int32", "versions": "0+", "entityType": "brokerId",
|
|
88
|
+
"about": "The set of nodes that are in sync with the leader for this partition." },
|
|
89
|
+
{ "name": "OfflineReplicas", "type": "[]int32", "versions": "5+", "ignorable": true, "entityType": "brokerId",
|
|
90
|
+
"about": "The set of offline replicas of this partition." }
|
|
91
|
+
]},
|
|
92
|
+
{ "name": "TopicAuthorizedOperations", "type": "int32", "versions": "8+", "default": "-2147483648",
|
|
93
|
+
"about": "32-bit bitfield to represent authorized operations for this topic." }
|
|
94
|
+
]},
|
|
95
|
+
{ "name": "ClusterAuthorizedOperations", "type": "int32", "versions": "8-10", "default": "-2147483648",
|
|
96
|
+
"about": "32-bit bitfield to represent authorized operations for this cluster." },
|
|
97
|
+
{ "name": "ErrorCode", "type": "int16", "versions": "13+", "ignorable": true,
|
|
98
|
+
"about": "The top-level error code, or 0 if there was no error." }
|
|
99
|
+
|
|
100
|
+
]
|
|
101
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
// Licensed to the Apache Software Foundation (ASF) under one or more
|
|
2
|
+
// contributor license agreements. See the NOTICE file distributed with
|
|
3
|
+
// this work for additional information regarding copyright ownership.
|
|
4
|
+
// The ASF licenses this file to You under the Apache License, Version 2.0
|
|
5
|
+
// (the "License"); you may not use this file except in compliance with
|
|
6
|
+
// the License. You may obtain a copy of the License at
|
|
7
|
+
//
|
|
8
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
//
|
|
10
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
// See the License for the specific language governing permissions and
|
|
14
|
+
// limitations under the License.
|
|
15
|
+
|
|
16
|
+
{
|
|
17
|
+
"apiKey": 8,
|
|
18
|
+
"type": "request",
|
|
19
|
+
"listeners": ["broker"],
|
|
20
|
+
"name": "OffsetCommitRequest",
|
|
21
|
+
// Versions 0-1 were removed in Apache Kafka 4.0, Version 2 is the new baseline.
|
|
22
|
+
//
|
|
23
|
+
// Version 1 adds timestamp and group membership information, as well as the commit timestamp.
|
|
24
|
+
//
|
|
25
|
+
// Version 2 adds retention time. It removes the commit timestamp added in version 1.
|
|
26
|
+
//
|
|
27
|
+
// Version 3 and 4 are the same as version 2.
|
|
28
|
+
//
|
|
29
|
+
// Version 5 removes the retention time, which is now controlled only by a broker configuration.
|
|
30
|
+
//
|
|
31
|
+
// Version 6 adds the leader epoch for fencing.
|
|
32
|
+
//
|
|
33
|
+
// version 7 adds a new field called groupInstanceId to indicate member identity across restarts.
|
|
34
|
+
//
|
|
35
|
+
// Version 8 is the first flexible version.
|
|
36
|
+
//
|
|
37
|
+
// Version 9 is the first version that can be used with the new consumer group protocol (KIP-848). The
|
|
38
|
+
// request is the same as version 8.
|
|
39
|
+
//
|
|
40
|
+
// Version 10 adds support for topic ids and removes support for topic names (KIP-848).
|
|
41
|
+
"validVersions": "2-10",
|
|
42
|
+
"flexibleVersions": "8+",
|
|
43
|
+
"fields": [
|
|
44
|
+
{ "name": "GroupId", "type": "string", "versions": "0+", "entityType": "groupId",
|
|
45
|
+
"about": "The unique group identifier." },
|
|
46
|
+
{ "name": "GenerationIdOrMemberEpoch", "type": "int32", "versions": "1+", "default": "-1", "ignorable": true,
|
|
47
|
+
"about": "The generation of the group if using the classic group protocol or the member epoch if using the consumer protocol." },
|
|
48
|
+
{ "name": "MemberId", "type": "string", "versions": "1+", "ignorable": true,
|
|
49
|
+
"about": "The member ID assigned by the group coordinator." },
|
|
50
|
+
{ "name": "GroupInstanceId", "type": "string", "versions": "7+",
|
|
51
|
+
"nullableVersions": "7+", "default": "null",
|
|
52
|
+
"about": "The unique identifier of the consumer instance provided by end user." },
|
|
53
|
+
{ "name": "RetentionTimeMs", "type": "int64", "versions": "2-4", "default": "-1", "ignorable": true,
|
|
54
|
+
"about": "The time period in ms to retain the offset." },
|
|
55
|
+
{ "name": "Topics", "type": "[]OffsetCommitRequestTopic", "versions": "0+",
|
|
56
|
+
"about": "The topics to commit offsets for.", "fields": [
|
|
57
|
+
{ "name": "Name", "type": "string", "versions": "0-9", "entityType": "topicName", "ignorable": true,
|
|
58
|
+
"about": "The topic name." },
|
|
59
|
+
{ "name": "TopicId", "type": "uuid", "versions": "10+", "ignorable": true,
|
|
60
|
+
"about": "The topic ID." },
|
|
61
|
+
{ "name": "Partitions", "type": "[]OffsetCommitRequestPartition", "versions": "0+",
|
|
62
|
+
"about": "Each partition to commit offsets for.", "fields": [
|
|
63
|
+
{ "name": "PartitionIndex", "type": "int32", "versions": "0+",
|
|
64
|
+
"about": "The partition index." },
|
|
65
|
+
{ "name": "CommittedOffset", "type": "int64", "versions": "0+",
|
|
66
|
+
"about": "The message offset to be committed." },
|
|
67
|
+
{ "name": "CommittedLeaderEpoch", "type": "int32", "versions": "6+", "default": "-1", "ignorable": true,
|
|
68
|
+
"about": "The leader epoch of this partition." },
|
|
69
|
+
{ "name": "CommitTimestamp", "type": "int64", "versions": "1", "default": "-1",
|
|
70
|
+
"about": "The timestamp of the commit." },
|
|
71
|
+
{ "name": "CommittedMetadata", "type": "string", "versions": "0+", "nullableVersions": "0+",
|
|
72
|
+
"about": "Any associated metadata the client wants to keep." }
|
|
73
|
+
]}
|
|
74
|
+
]}
|
|
75
|
+
]
|
|
76
|
+
}
|