summaryrefslogtreecommitdiff
path: root/kafka/protocol
diff options
context:
space:
mode:
authorDana Powers <dana.powers@gmail.com>2017-08-05 10:20:30 -0700
committerDana Powers <dana.powers@gmail.com>2017-08-05 10:20:30 -0700
commit8c857a692b993ec01826ae77e704b07d269a4534 (patch)
tree6601c2a772d71d0f1fb245ec890f476c2441beff /kafka/protocol
parent165b897139ae69e5935c2618759773572781ef17 (diff)
downloadkafka-python-handle_api_versions.tar.gz
Add private map of api key -> min/max versions to BrokerConnectionhandle_api_versions
Diffstat (limited to 'kafka/protocol')
-rw-r--r--kafka/protocol/__init__.py37
1 files changed, 37 insertions, 0 deletions
diff --git a/kafka/protocol/__init__.py b/kafka/protocol/__init__.py
index 2a269a5..4dcf4a4 100644
--- a/kafka/protocol/__init__.py
+++ b/kafka/protocol/__init__.py
@@ -6,3 +6,40 @@ from .legacy import (
CODEC_NONE, CODEC_GZIP, CODEC_SNAPPY, ALL_CODECS,
ATTRIBUTE_CODEC_MASK, KafkaProtocol,
)
+
+API_KEYS = {
+ 0: 'Produce',
+ 1: 'Fetch',
+ 2: 'ListOffsets',
+ 3: 'Metadata',
+ 4: 'LeaderAndIsr',
+ 5: 'StopReplica',
+ 6: 'UpdateMetadata',
+ 7: 'ControlledShutdown',
+ 8: 'OffsetCommit',
+ 9: 'OffsetFetch',
+ 10: 'FindCoordinator',
+ 11: 'JoinGroup',
+ 12: 'Heartbeat',
+ 13: 'LeaveGroup',
+ 14: 'SyncGroup',
+ 15: 'DescribeGroups',
+ 16: 'ListGroups',
+ 17: 'SaslHandshake',
+ 18: 'ApiVersions',
+ 19: 'CreateTopics',
+ 20: 'DeleteTopics',
+ 21: 'DeleteRecords',
+ 22: 'InitProducerId',
+ 23: 'OffsetForLeaderEpoch',
+ 24: 'AddPartitionsToTxn',
+ 25: 'AddOffsetsToTxn',
+ 26: 'EndTxn',
+ 27: 'WriteTxnMarkers',
+ 28: 'TxnOffsetCommit',
+ 29: 'DescribeAcls',
+ 30: 'CreateAcls',
+ 31: 'DeleteAcls',
+ 32: 'DescribeConfigs',
+ 33: 'AlterConfigs',
+}