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,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": 8,
|
|
18
|
+
"type": "response",
|
|
19
|
+
"name": "OffsetCommitResponse",
|
|
20
|
+
// Versions 0-1 were removed in Apache Kafka 4.0, Version 2 is the new baseline.
|
|
21
|
+
//
|
|
22
|
+
// Versions 1 and 2 are the same as version 0.
|
|
23
|
+
//
|
|
24
|
+
// Version 3 adds the throttle time to the response.
|
|
25
|
+
//
|
|
26
|
+
// Starting in version 4, on quota violation, brokers send out responses before throttling.
|
|
27
|
+
//
|
|
28
|
+
// Versions 5 and 6 are the same as version 4.
|
|
29
|
+
//
|
|
30
|
+
// Version 7 offsetCommitRequest supports a new field called groupInstanceId to indicate member identity across restarts.
|
|
31
|
+
//
|
|
32
|
+
// Version 8 is the first flexible version.
|
|
33
|
+
//
|
|
34
|
+
// Version 9 is the first version that can be used with the new consumer group protocol (KIP-848). The response is
|
|
35
|
+
// the same as version 8 but can return STALE_MEMBER_EPOCH when the new consumer group protocol is used and
|
|
36
|
+
// GROUP_ID_NOT_FOUND when the group does not exist for both protocols.
|
|
37
|
+
//
|
|
38
|
+
// Version 10 adds support for topic ids and removes support for topic names (KIP-848).
|
|
39
|
+
"validVersions": "2-10",
|
|
40
|
+
"flexibleVersions": "8+",
|
|
41
|
+
// Supported errors:
|
|
42
|
+
// - GROUP_AUTHORIZATION_FAILED (version 0+)
|
|
43
|
+
// - NOT_COORDINATOR (version 0+)
|
|
44
|
+
// - COORDINATOR_NOT_AVAILABLE (version 0+)
|
|
45
|
+
// - COORDINATOR_LOAD_IN_PROGRESS (version 0+)
|
|
46
|
+
// - ILLEGAL_GENERATION (version 1+)
|
|
47
|
+
// - UNKNOWN_MEMBER_ID (version 1+)
|
|
48
|
+
// - INVALID_COMMIT_OFFSET_SIZE (version 0+)
|
|
49
|
+
// - FENCED_MEMBER_EPOCH (version 7+)
|
|
50
|
+
// - GROUP_ID_NOT_FOUND (version 9+)
|
|
51
|
+
// - STALE_MEMBER_EPOCH (version 9+)
|
|
52
|
+
// - UNKNOWN_TOPIC_ID (version 10+)
|
|
53
|
+
"fields": [
|
|
54
|
+
{ "name": "ThrottleTimeMs", "type": "int32", "versions": "3+", "ignorable": true,
|
|
55
|
+
"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." },
|
|
56
|
+
{ "name": "Topics", "type": "[]OffsetCommitResponseTopic", "versions": "0+",
|
|
57
|
+
"about": "The responses for each topic.", "fields": [
|
|
58
|
+
{ "name": "Name", "type": "string", "versions": "0-9", "entityType": "topicName", "ignorable": true,
|
|
59
|
+
"about": "The topic name." },
|
|
60
|
+
{ "name": "TopicId", "type": "uuid", "versions": "10+", "ignorable": true,
|
|
61
|
+
"about": "The topic ID." },
|
|
62
|
+
{ "name": "Partitions", "type": "[]OffsetCommitResponsePartition", "versions": "0+",
|
|
63
|
+
"about": "The responses for each partition in the topic.", "fields": [
|
|
64
|
+
{ "name": "PartitionIndex", "type": "int32", "versions": "0+",
|
|
65
|
+
"about": "The partition index." },
|
|
66
|
+
{ "name": "ErrorCode", "type": "int16", "versions": "0+",
|
|
67
|
+
"about": "The error code, or 0 if there was no error." }
|
|
68
|
+
]}
|
|
69
|
+
]}
|
|
70
|
+
]
|
|
71
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
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": 47,
|
|
18
|
+
"type": "request",
|
|
19
|
+
"listeners": ["broker"],
|
|
20
|
+
"name": "OffsetDeleteRequest",
|
|
21
|
+
"validVersions": "0",
|
|
22
|
+
"flexibleVersions": "none",
|
|
23
|
+
"fields": [
|
|
24
|
+
{ "name": "GroupId", "type": "string", "versions": "0+", "entityType": "groupId",
|
|
25
|
+
"about": "The unique group identifier." },
|
|
26
|
+
{ "name": "Topics", "type": "[]OffsetDeleteRequestTopic", "versions": "0+",
|
|
27
|
+
"about": "The topics to delete offsets for.", "fields": [
|
|
28
|
+
{ "name": "Name", "type": "string", "versions": "0+", "mapKey": true, "entityType": "topicName",
|
|
29
|
+
"about": "The topic name." },
|
|
30
|
+
{ "name": "Partitions", "type": "[]OffsetDeleteRequestPartition", "versions": "0+",
|
|
31
|
+
"about": "Each partition to delete offsets for.", "fields": [
|
|
32
|
+
{ "name": "PartitionIndex", "type": "int32", "versions": "0+",
|
|
33
|
+
"about": "The partition index." }
|
|
34
|
+
]
|
|
35
|
+
}
|
|
36
|
+
]
|
|
37
|
+
}
|
|
38
|
+
]
|
|
39
|
+
}
|
|
@@ -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": 47,
|
|
18
|
+
"type": "response",
|
|
19
|
+
"name": "OffsetDeleteResponse",
|
|
20
|
+
"validVersions": "0",
|
|
21
|
+
"flexibleVersions": "none",
|
|
22
|
+
"fields": [
|
|
23
|
+
{ "name": "ErrorCode", "type": "int16", "versions": "0+",
|
|
24
|
+
"about": "The top-level error code, or 0 if there was no error." },
|
|
25
|
+
{ "name": "ThrottleTimeMs", "type": "int32", "versions": "0+", "ignorable": true,
|
|
26
|
+
"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." },
|
|
27
|
+
{ "name": "Topics", "type": "[]OffsetDeleteResponseTopic", "versions": "0+",
|
|
28
|
+
"about": "The responses for each topic.", "fields": [
|
|
29
|
+
{ "name": "Name", "type": "string", "versions": "0+", "mapKey": true, "entityType": "topicName",
|
|
30
|
+
"about": "The topic name." },
|
|
31
|
+
{ "name": "Partitions", "type": "[]OffsetDeleteResponsePartition", "versions": "0+",
|
|
32
|
+
"about": "The responses for each partition in the topic.", "fields": [
|
|
33
|
+
{ "name": "PartitionIndex", "type": "int32", "versions": "0+", "mapKey": true,
|
|
34
|
+
"about": "The partition index." },
|
|
35
|
+
{ "name": "ErrorCode", "type": "int16", "versions": "0+",
|
|
36
|
+
"about": "The error code, or 0 if there was no error." }
|
|
37
|
+
]
|
|
38
|
+
}
|
|
39
|
+
]
|
|
40
|
+
}
|
|
41
|
+
]
|
|
42
|
+
}
|
|
@@ -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": 9,
|
|
18
|
+
"type": "request",
|
|
19
|
+
"listeners": ["broker"],
|
|
20
|
+
"name": "OffsetFetchRequest",
|
|
21
|
+
// Version 0 was removed in Apache Kafka 4.0, Version 1 is the new baseline.
|
|
22
|
+
//
|
|
23
|
+
// In version 0, the request read offsets from ZK.
|
|
24
|
+
//
|
|
25
|
+
// Starting in version 1, the broker supports fetching offsets from the internal __consumer_offsets topic.
|
|
26
|
+
//
|
|
27
|
+
// Starting in version 2, the request can contain a null topics array to indicate that offsets
|
|
28
|
+
// for all topics should be fetched. It also returns a top level error code
|
|
29
|
+
// for group or coordinator level errors.
|
|
30
|
+
//
|
|
31
|
+
// Version 3, 4, and 5 are the same as version 2.
|
|
32
|
+
//
|
|
33
|
+
// Version 6 is the first flexible version.
|
|
34
|
+
//
|
|
35
|
+
// Version 7 is adding the require stable flag.
|
|
36
|
+
//
|
|
37
|
+
// Version 8 is adding support for fetching offsets for multiple groups at a time.
|
|
38
|
+
//
|
|
39
|
+
// Version 9 is the first version that can be used with the new consumer group protocol (KIP-848). It adds
|
|
40
|
+
// the MemberId and MemberEpoch fields. Those are filled in and validated when the new consumer protocol is used.
|
|
41
|
+
//
|
|
42
|
+
// Version 10 adds support for topic ids and removes support for topic names (KIP-848).
|
|
43
|
+
"validVersions": "1-10",
|
|
44
|
+
"flexibleVersions": "6+",
|
|
45
|
+
"fields": [
|
|
46
|
+
{ "name": "GroupId", "type": "string", "versions": "0-7", "entityType": "groupId",
|
|
47
|
+
"about": "The group to fetch offsets for." },
|
|
48
|
+
{ "name": "Topics", "type": "[]OffsetFetchRequestTopic", "versions": "0-7", "nullableVersions": "2-7",
|
|
49
|
+
"about": "Each topic we would like to fetch offsets for, or null to fetch offsets for all topics.", "fields": [
|
|
50
|
+
{ "name": "Name", "type": "string", "versions": "0-7", "entityType": "topicName",
|
|
51
|
+
"about": "The topic name."},
|
|
52
|
+
{ "name": "PartitionIndexes", "type": "[]int32", "versions": "0-7",
|
|
53
|
+
"about": "The partition indexes we would like to fetch offsets for." }
|
|
54
|
+
]},
|
|
55
|
+
{ "name": "Groups", "type": "[]OffsetFetchRequestGroup", "versions": "8+",
|
|
56
|
+
"about": "Each group we would like to fetch offsets for.", "fields": [
|
|
57
|
+
{ "name": "GroupId", "type": "string", "versions": "8+", "entityType": "groupId",
|
|
58
|
+
"about": "The group ID."},
|
|
59
|
+
{ "name": "MemberId", "type": "string", "versions": "9+", "nullableVersions": "9+", "default": "null", "ignorable": true,
|
|
60
|
+
"about": "The member id." },
|
|
61
|
+
{ "name": "MemberEpoch", "type": "int32", "versions": "9+", "default": "-1", "ignorable": true,
|
|
62
|
+
"about": "The member epoch if using the new consumer protocol (KIP-848)." },
|
|
63
|
+
{ "name": "Topics", "type": "[]OffsetFetchRequestTopics", "versions": "8+", "nullableVersions": "8+",
|
|
64
|
+
"about": "Each topic we would like to fetch offsets for, or null to fetch offsets for all topics.", "fields": [
|
|
65
|
+
{ "name": "Name", "type": "string", "versions": "8-9", "entityType": "topicName", "ignorable": true,
|
|
66
|
+
"about": "The topic name."},
|
|
67
|
+
{ "name": "TopicId", "type": "uuid", "versions": "10+", "ignorable": true,
|
|
68
|
+
"about": "The topic ID." },
|
|
69
|
+
{ "name": "PartitionIndexes", "type": "[]int32", "versions": "8+",
|
|
70
|
+
"about": "The partition indexes we would like to fetch offsets for." }
|
|
71
|
+
]}
|
|
72
|
+
]},
|
|
73
|
+
{ "name": "RequireStable", "type": "bool", "versions": "7+", "default": "false",
|
|
74
|
+
"about": "Whether broker should hold on returning unstable offsets but set a retriable error code for the partitions." }
|
|
75
|
+
]
|
|
76
|
+
}
|
|
@@ -0,0 +1,107 @@
|
|
|
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": 9,
|
|
18
|
+
"type": "response",
|
|
19
|
+
"name": "OffsetFetchResponse",
|
|
20
|
+
// Version 0 was removed in Apache Kafka 4.0, Version 1 is the new baseline.
|
|
21
|
+
//
|
|
22
|
+
// Version 1 is the same as version 0.
|
|
23
|
+
//
|
|
24
|
+
// Version 2 adds a top-level error code.
|
|
25
|
+
//
|
|
26
|
+
// Version 3 adds the throttle time.
|
|
27
|
+
//
|
|
28
|
+
// Starting in version 4, on quota violation, brokers send out responses before throttling.
|
|
29
|
+
//
|
|
30
|
+
// Version 5 adds the leader epoch to the committed offset.
|
|
31
|
+
//
|
|
32
|
+
// Version 6 is the first flexible version.
|
|
33
|
+
//
|
|
34
|
+
// Version 7 adds pending offset commit as new error response on partition level.
|
|
35
|
+
//
|
|
36
|
+
// Version 8 is adding support for fetching offsets for multiple groups
|
|
37
|
+
//
|
|
38
|
+
// Version 9 is the first version that can be used with the new consumer group protocol (KIP-848). The response is
|
|
39
|
+
// the same as version 8 but can return STALE_MEMBER_EPOCH and UNKNOWN_MEMBER_ID errors when the new consumer group
|
|
40
|
+
// protocol is used.
|
|
41
|
+
//
|
|
42
|
+
// Version 10 adds support for topic ids and removes support for topic names (KIP-848).
|
|
43
|
+
// It can return UNKNOWN_TOPIC_ID if topic IDs used and the topic is not found in metadata.
|
|
44
|
+
"validVersions": "1-10",
|
|
45
|
+
"flexibleVersions": "6+",
|
|
46
|
+
// Supported errors:
|
|
47
|
+
// - GROUP_AUTHORIZATION_FAILED (version 0+)
|
|
48
|
+
// - NOT_COORDINATOR (version 0+)
|
|
49
|
+
// - COORDINATOR_NOT_AVAILABLE (version 0+)
|
|
50
|
+
// - COORDINATOR_LOAD_IN_PROGRESS (version 0+)
|
|
51
|
+
// - GROUP_ID_NOT_FOUND (version 0+)
|
|
52
|
+
// - UNSTABLE_OFFSET_COMMIT (version 7+)
|
|
53
|
+
// - UNKNOWN_MEMBER_ID (version 9+)
|
|
54
|
+
// - STALE_MEMBER_EPOCH (version 9+)
|
|
55
|
+
// - UNKNOWN_TOPIC_ID (version 10+)
|
|
56
|
+
"fields": [
|
|
57
|
+
{ "name": "ThrottleTimeMs", "type": "int32", "versions": "3+", "ignorable": true,
|
|
58
|
+
"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." },
|
|
59
|
+
{ "name": "Topics", "type": "[]OffsetFetchResponseTopic", "versions": "0-7",
|
|
60
|
+
"about": "The responses per topic.", "fields": [
|
|
61
|
+
{ "name": "Name", "type": "string", "versions": "0-7", "entityType": "topicName",
|
|
62
|
+
"about": "The topic name." },
|
|
63
|
+
{ "name": "Partitions", "type": "[]OffsetFetchResponsePartition", "versions": "0-7",
|
|
64
|
+
"about": "The responses per partition.", "fields": [
|
|
65
|
+
{ "name": "PartitionIndex", "type": "int32", "versions": "0-7",
|
|
66
|
+
"about": "The partition index." },
|
|
67
|
+
{ "name": "CommittedOffset", "type": "int64", "versions": "0-7",
|
|
68
|
+
"about": "The committed message offset." },
|
|
69
|
+
{ "name": "CommittedLeaderEpoch", "type": "int32", "versions": "5-7", "default": "-1",
|
|
70
|
+
"ignorable": true, "about": "The leader epoch." },
|
|
71
|
+
{ "name": "Metadata", "type": "string", "versions": "0-7", "nullableVersions": "0-7",
|
|
72
|
+
"about": "The partition metadata." },
|
|
73
|
+
{ "name": "ErrorCode", "type": "int16", "versions": "0-7",
|
|
74
|
+
"about": "The error code, or 0 if there was no error." }
|
|
75
|
+
]}
|
|
76
|
+
]},
|
|
77
|
+
{ "name": "ErrorCode", "type": "int16", "versions": "2-7", "default": "0", "ignorable": true,
|
|
78
|
+
"about": "The top-level error code, or 0 if there was no error." },
|
|
79
|
+
{ "name": "Groups", "type": "[]OffsetFetchResponseGroup", "versions": "8+",
|
|
80
|
+
"about": "The responses per group id.", "fields": [
|
|
81
|
+
{ "name": "GroupId", "type": "string", "versions": "8+", "entityType": "groupId",
|
|
82
|
+
"about": "The group ID." },
|
|
83
|
+
{ "name": "Topics", "type": "[]OffsetFetchResponseTopics", "versions": "8+",
|
|
84
|
+
"about": "The responses per topic.", "fields": [
|
|
85
|
+
{ "name": "Name", "type": "string", "versions": "8-9", "entityType": "topicName", "ignorable": true,
|
|
86
|
+
"about": "The topic name." },
|
|
87
|
+
{ "name": "TopicId", "type": "uuid", "versions": "10+", "ignorable": true,
|
|
88
|
+
"about": "The topic ID." },
|
|
89
|
+
{ "name": "Partitions", "type": "[]OffsetFetchResponsePartitions", "versions": "8+",
|
|
90
|
+
"about": "The responses per partition.", "fields": [
|
|
91
|
+
{ "name": "PartitionIndex", "type": "int32", "versions": "8+",
|
|
92
|
+
"about": "The partition index." },
|
|
93
|
+
{ "name": "CommittedOffset", "type": "int64", "versions": "8+",
|
|
94
|
+
"about": "The committed message offset." },
|
|
95
|
+
{ "name": "CommittedLeaderEpoch", "type": "int32", "versions": "8+", "default": "-1",
|
|
96
|
+
"ignorable": true, "about": "The leader epoch." },
|
|
97
|
+
{ "name": "Metadata", "type": "string", "versions": "8+", "nullableVersions": "8+",
|
|
98
|
+
"about": "The partition metadata." },
|
|
99
|
+
{ "name": "ErrorCode", "type": "int16", "versions": "8+",
|
|
100
|
+
"about": "The partition-level error code, or 0 if there was no error." }
|
|
101
|
+
]}
|
|
102
|
+
]},
|
|
103
|
+
{ "name": "ErrorCode", "type": "int16", "versions": "8+", "default": "0",
|
|
104
|
+
"about": "The group-level error code, or 0 if there was no error." }
|
|
105
|
+
]}
|
|
106
|
+
]
|
|
107
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
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": 23,
|
|
18
|
+
"type": "request",
|
|
19
|
+
"listeners": ["broker"],
|
|
20
|
+
"name": "OffsetForLeaderEpochRequest",
|
|
21
|
+
// Versions 0-1 were removed in Apache Kafka 4.0, Version 2 is the new baseline.
|
|
22
|
+
//
|
|
23
|
+
// Version 1 is the same as version 0.
|
|
24
|
+
//
|
|
25
|
+
// Version 2 adds the current leader epoch to support fencing.
|
|
26
|
+
//
|
|
27
|
+
// Version 3 adds ReplicaId (the default is -2 which conventionally represents a
|
|
28
|
+
// "debug" consumer which is allowed to see offsets beyond the high watermark).
|
|
29
|
+
// Followers will use this replicaId when using an older version of the protocol.
|
|
30
|
+
//
|
|
31
|
+
// Version 4 enables flexible versions.
|
|
32
|
+
"validVersions": "2-4",
|
|
33
|
+
"flexibleVersions": "4+",
|
|
34
|
+
"fields": [
|
|
35
|
+
{ "name": "ReplicaId", "type": "int32", "versions": "3+", "default": -2, "ignorable": true, "entityType": "brokerId",
|
|
36
|
+
"about": "The broker ID of the follower, of -1 if this request is from a consumer." },
|
|
37
|
+
{ "name": "Topics", "type": "[]OffsetForLeaderTopic", "versions": "0+",
|
|
38
|
+
"about": "Each topic to get offsets for.", "fields": [
|
|
39
|
+
{ "name": "Topic", "type": "string", "versions": "0+", "entityType": "topicName",
|
|
40
|
+
"mapKey": true, "about": "The topic name." },
|
|
41
|
+
{ "name": "Partitions", "type": "[]OffsetForLeaderPartition", "versions": "0+",
|
|
42
|
+
"about": "Each partition to get offsets for.", "fields": [
|
|
43
|
+
{ "name": "Partition", "type": "int32", "versions": "0+",
|
|
44
|
+
"about": "The partition index." },
|
|
45
|
+
{ "name": "CurrentLeaderEpoch", "type": "int32", "versions": "2+", "default": "-1", "ignorable": true,
|
|
46
|
+
"about": "An epoch used to fence consumers/replicas with old metadata. If the epoch provided by the client is larger than the current epoch known to the broker, then the UNKNOWN_LEADER_EPOCH error code will be returned. If the provided epoch is smaller, then the FENCED_LEADER_EPOCH error code will be returned." },
|
|
47
|
+
{ "name": "LeaderEpoch", "type": "int32", "versions": "0+",
|
|
48
|
+
"about": "The epoch to look up an offset for." }
|
|
49
|
+
]}
|
|
50
|
+
]}
|
|
51
|
+
]
|
|
52
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
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": 23,
|
|
18
|
+
"type": "response",
|
|
19
|
+
"name": "OffsetForLeaderEpochResponse",
|
|
20
|
+
// Versions 0-1 were removed in Apache Kafka 4.0, Version 2 is the new baseline.
|
|
21
|
+
//
|
|
22
|
+
// Version 1 added the leader epoch to the response.
|
|
23
|
+
//
|
|
24
|
+
// Version 2 added the throttle time.
|
|
25
|
+
//
|
|
26
|
+
// Version 3 is the same as version 2.
|
|
27
|
+
//
|
|
28
|
+
// Version 4 enables flexible versions.
|
|
29
|
+
"validVersions": "2-4",
|
|
30
|
+
"flexibleVersions": "4+",
|
|
31
|
+
"fields": [
|
|
32
|
+
{ "name": "ThrottleTimeMs", "type": "int32", "versions": "2+", "ignorable": true,
|
|
33
|
+
"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." },
|
|
34
|
+
{ "name": "Topics", "type": "[]OffsetForLeaderTopicResult", "versions": "0+",
|
|
35
|
+
"about": "Each topic we fetched offsets for.", "fields": [
|
|
36
|
+
{ "name": "Topic", "type": "string", "versions": "0+", "entityType": "topicName",
|
|
37
|
+
"mapKey": true, "about": "The topic name." },
|
|
38
|
+
{ "name": "Partitions", "type": "[]EpochEndOffset", "versions": "0+",
|
|
39
|
+
"about": "Each partition in the topic we fetched offsets for.", "fields": [
|
|
40
|
+
{ "name": "ErrorCode", "type": "int16", "versions": "0+",
|
|
41
|
+
"about": "The error code 0, or if there was no error." },
|
|
42
|
+
{ "name": "Partition", "type": "int32", "versions": "0+",
|
|
43
|
+
"about": "The partition index." },
|
|
44
|
+
{ "name": "LeaderEpoch", "type": "int32", "versions": "1+", "default": "-1", "ignorable": true,
|
|
45
|
+
"about": "The leader epoch of the partition." },
|
|
46
|
+
{ "name": "EndOffset", "type": "int64", "versions": "0+", "default": "-1",
|
|
47
|
+
"about": "The end offset of the epoch." }
|
|
48
|
+
]}
|
|
49
|
+
]}
|
|
50
|
+
]
|
|
51
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
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": 0,
|
|
18
|
+
"type": "request",
|
|
19
|
+
"listeners": ["broker"],
|
|
20
|
+
"name": "ProduceRequest",
|
|
21
|
+
// Versions 0-2 were removed in Apache Kafka 4.0, version 3 is the new baseline. Due to a bug in librdkafka,
|
|
22
|
+
// these versions have to be included in the api versions response (see KAFKA-18659), but are rejected otherwise.
|
|
23
|
+
// See `ApiKeys.PRODUCE_API_VERSIONS_RESPONSE_MIN_VERSION` for more details.
|
|
24
|
+
//
|
|
25
|
+
// Version 1 and 2 are the same as version 0.
|
|
26
|
+
//
|
|
27
|
+
// Version 3 adds the transactional ID, which is used for authorization when attempting to write
|
|
28
|
+
// transactional data. Version 3 also adds support for Kafka Message Format v2.
|
|
29
|
+
//
|
|
30
|
+
// Version 4 is the same as version 3, but the requester must be prepared to handle a
|
|
31
|
+
// KAFKA_STORAGE_ERROR.
|
|
32
|
+
//
|
|
33
|
+
// Version 5 and 6 are the same as version 3.
|
|
34
|
+
//
|
|
35
|
+
// Starting in version 7, records can be produced using ZStandard compression. See KIP-110.
|
|
36
|
+
//
|
|
37
|
+
// Starting in Version 8, response has RecordErrors and ErrorMessage. See KIP-467.
|
|
38
|
+
//
|
|
39
|
+
// Version 9 enables flexible versions.
|
|
40
|
+
//
|
|
41
|
+
// Version 10 is the same as version 9 (KIP-951).
|
|
42
|
+
//
|
|
43
|
+
// Version 11 adds support for new error code TRANSACTION_ABORTABLE (KIP-890).
|
|
44
|
+
//
|
|
45
|
+
// Version 12 is the same as version 11 (KIP-890). Note when produce requests are used in transaction, if
|
|
46
|
+
// transaction V2 (KIP_890 part 2) is enabled, the produce request will also include the function for a
|
|
47
|
+
// AddPartitionsToTxn call. If V2 is disabled, the client can't use produce request version higher than 11 within
|
|
48
|
+
// a transaction.
|
|
49
|
+
// Version 13 replaces topic names with topic IDs (KIP-516). May return UNKNOWN_TOPIC_ID error code.
|
|
50
|
+
"validVersions": "3-13",
|
|
51
|
+
"flexibleVersions": "9+",
|
|
52
|
+
"fields": [
|
|
53
|
+
{ "name": "TransactionalId", "type": "string", "versions": "3+", "nullableVersions": "3+", "default": "null", "entityType": "transactionalId",
|
|
54
|
+
"about": "The transactional ID, or null if the producer is not transactional." },
|
|
55
|
+
{ "name": "Acks", "type": "int16", "versions": "0+",
|
|
56
|
+
"about": "The number of acknowledgments the producer requires the leader to have received before considering a request complete. Allowed values: 0 for no acknowledgments, 1 for only the leader and -1 for the full ISR." },
|
|
57
|
+
{ "name": "TimeoutMs", "type": "int32", "versions": "0+",
|
|
58
|
+
"about": "The timeout to await a response in milliseconds." },
|
|
59
|
+
{ "name": "TopicData", "type": "[]TopicProduceData", "versions": "0+",
|
|
60
|
+
"about": "Each topic to produce to.", "fields": [
|
|
61
|
+
{ "name": "Name", "type": "string", "versions": "0-12", "entityType": "topicName", "mapKey": true, "ignorable": true,
|
|
62
|
+
"about": "The topic name." },
|
|
63
|
+
{ "name": "TopicId", "type": "uuid", "versions": "13+", "mapKey": true, "ignorable": true, "about": "The unique topic ID" },
|
|
64
|
+
{ "name": "PartitionData", "type": "[]PartitionProduceData", "versions": "0+",
|
|
65
|
+
"about": "Each partition to produce to.", "fields": [
|
|
66
|
+
{ "name": "Index", "type": "int32", "versions": "0+",
|
|
67
|
+
"about": "The partition index." },
|
|
68
|
+
{ "name": "Records", "type": "records", "versions": "0+", "nullableVersions": "0+",
|
|
69
|
+
"about": "The record data to be produced." }
|
|
70
|
+
]}
|
|
71
|
+
]}
|
|
72
|
+
]
|
|
73
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
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": 0,
|
|
18
|
+
"type": "response",
|
|
19
|
+
"name": "ProduceResponse",
|
|
20
|
+
// Versions 0-2 were removed in Apache Kafka 4.0, version 3 is the new baseline. Due to a bug in librdkafka,
|
|
21
|
+
// these versions have to be included in the api versions response (see KAFKA-18659), but are rejected otherwise.
|
|
22
|
+
// See `ApiKeys.PRODUCE_API_VERSIONS_RESPONSE_MIN_VERSION` for more details.
|
|
23
|
+
//
|
|
24
|
+
// Version 1 added the throttle time.
|
|
25
|
+
// Version 2 added the log append time.
|
|
26
|
+
//
|
|
27
|
+
// Version 3 is the same as version 2.
|
|
28
|
+
//
|
|
29
|
+
// Version 4 added KAFKA_STORAGE_ERROR as a possible error code.
|
|
30
|
+
//
|
|
31
|
+
// Version 5 added LogStartOffset to filter out spurious OutOfOrderSequenceExceptions on the client.
|
|
32
|
+
//
|
|
33
|
+
// Version 8 added RecordErrors and ErrorMessage to include information about
|
|
34
|
+
// records that cause the whole batch to be dropped. See KIP-467 for details.
|
|
35
|
+
//
|
|
36
|
+
// Version 9 enables flexible versions.
|
|
37
|
+
//
|
|
38
|
+
// Version 10 adds 'CurrentLeader' and 'NodeEndpoints' as tagged fields (KIP-951)
|
|
39
|
+
//
|
|
40
|
+
// Version 11 adds support for new error code TRANSACTION_ABORTABLE (KIP-890).
|
|
41
|
+
//
|
|
42
|
+
// Version 12 is the same as version 10 (KIP-890).
|
|
43
|
+
// Version 13 replaces topic names with topic IDs (KIP-516). May return UNKNOWN_TOPIC_ID error code.
|
|
44
|
+
"validVersions": "3-13",
|
|
45
|
+
"flexibleVersions": "9+",
|
|
46
|
+
"fields": [
|
|
47
|
+
{ "name": "Responses", "type": "[]TopicProduceResponse", "versions": "0+",
|
|
48
|
+
"about": "Each produce response.", "fields": [
|
|
49
|
+
{ "name": "Name", "type": "string", "versions": "0-12", "entityType": "topicName", "mapKey": true, "ignorable": true,
|
|
50
|
+
"about": "The topic name." },
|
|
51
|
+
{ "name": "TopicId", "type": "uuid", "versions": "13+", "mapKey": true, "ignorable": true, "about": "The unique topic ID" },
|
|
52
|
+
{ "name": "PartitionResponses", "type": "[]PartitionProduceResponse", "versions": "0+",
|
|
53
|
+
"about": "Each partition that we produced to within the topic.", "fields": [
|
|
54
|
+
{ "name": "Index", "type": "int32", "versions": "0+",
|
|
55
|
+
"about": "The partition index." },
|
|
56
|
+
{ "name": "ErrorCode", "type": "int16", "versions": "0+",
|
|
57
|
+
"about": "The error code, or 0 if there was no error." },
|
|
58
|
+
{ "name": "BaseOffset", "type": "int64", "versions": "0+",
|
|
59
|
+
"about": "The base offset." },
|
|
60
|
+
{ "name": "LogAppendTimeMs", "type": "int64", "versions": "2+", "default": "-1", "ignorable": true,
|
|
61
|
+
"about": "The timestamp returned by broker after appending the messages. If CreateTime is used for the topic, the timestamp will be -1. If LogAppendTime is used for the topic, the timestamp will be the broker local time when the messages are appended." },
|
|
62
|
+
{ "name": "LogStartOffset", "type": "int64", "versions": "5+", "default": "-1", "ignorable": true,
|
|
63
|
+
"about": "The log start offset." },
|
|
64
|
+
{ "name": "RecordErrors", "type": "[]BatchIndexAndErrorMessage", "versions": "8+", "ignorable": true,
|
|
65
|
+
"about": "The batch indices of records that caused the batch to be dropped.", "fields": [
|
|
66
|
+
{ "name": "BatchIndex", "type": "int32", "versions": "8+",
|
|
67
|
+
"about": "The batch index of the record that caused the batch to be dropped." },
|
|
68
|
+
{ "name": "BatchIndexErrorMessage", "type": "string", "default": "null", "versions": "8+", "nullableVersions": "8+",
|
|
69
|
+
"about": "The error message of the record that caused the batch to be dropped."}
|
|
70
|
+
]},
|
|
71
|
+
{ "name": "ErrorMessage", "type": "string", "default": "null", "versions": "8+", "nullableVersions": "8+", "ignorable": true,
|
|
72
|
+
"about": "The global error message summarizing the common root cause of the records that caused the batch to be dropped."},
|
|
73
|
+
{ "name": "CurrentLeader", "type": "LeaderIdAndEpoch", "versions": "10+", "taggedVersions": "10+", "tag": 0,
|
|
74
|
+
"about": "The leader broker that the producer should use for future requests.", "fields": [
|
|
75
|
+
{ "name": "LeaderId", "type": "int32", "versions": "10+", "default": "-1", "entityType": "brokerId",
|
|
76
|
+
"about": "The ID of the current leader or -1 if the leader is unknown."},
|
|
77
|
+
{ "name": "LeaderEpoch", "type": "int32", "versions": "10+", "default": "-1",
|
|
78
|
+
"about": "The latest known leader epoch."}
|
|
79
|
+
]}
|
|
80
|
+
]}
|
|
81
|
+
]},
|
|
82
|
+
{ "name": "ThrottleTimeMs", "type": "int32", "versions": "1+", "ignorable": true, "default": "0",
|
|
83
|
+
"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." },
|
|
84
|
+
{ "name": "NodeEndpoints", "type": "[]NodeEndpoint", "versions": "10+", "taggedVersions": "10+", "tag": 0,
|
|
85
|
+
"about": "Endpoints for all current-leaders enumerated in PartitionProduceResponses, with errors NOT_LEADER_OR_FOLLOWER.", "fields": [
|
|
86
|
+
{ "name": "NodeId", "type": "int32", "versions": "10+",
|
|
87
|
+
"mapKey": true, "entityType": "brokerId", "about": "The ID of the associated node."},
|
|
88
|
+
{ "name": "Host", "type": "string", "versions": "10+",
|
|
89
|
+
"about": "The node's hostname." },
|
|
90
|
+
{ "name": "Port", "type": "int32", "versions": "10+",
|
|
91
|
+
"about": "The node's port." },
|
|
92
|
+
{ "name": "Rack", "type": "string", "versions": "10+", "nullableVersions": "10+", "default": "null",
|
|
93
|
+
"about": "The rack of the node, or null if it has not been assigned to a rack." }
|
|
94
|
+
]}
|
|
95
|
+
]
|
|
96
|
+
}
|