diff options
Diffstat (limited to 'kafka/protocol/produce.py')
| -rw-r--r-- | kafka/protocol/produce.py | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/kafka/protocol/produce.py b/kafka/protocol/produce.py index 532a702..ef2f96e 100644 --- a/kafka/protocol/produce.py +++ b/kafka/protocol/produce.py @@ -3,28 +3,27 @@ from .struct import Struct from .types import Int8, Int16, Int32, Int64, Bytes, String, Array, Schema -class ProduceRequest(Struct): - API_KEY = 0 - API_VERSION = 0 +class ProduceResponse(Struct): SCHEMA = Schema( - ('required_acks', Int16), - ('timeout', Int32), ('topics', Array( ('topic', String('utf-8')), ('partitions', Array( ('partition', Int32), - ('messages', MessageSet))))) + ('error_code', Int16), + ('offset', Int64))))) ) -class ProduceResponse(Struct): +class ProduceRequest(Struct): API_KEY = 0 API_VERSION = 0 + RESPONSE_TYPE = ProduceResponse SCHEMA = Schema( + ('required_acks', Int16), + ('timeout', Int32), ('topics', Array( ('topic', String('utf-8')), ('partitions', Array( ('partition', Int32), - ('error_code', Int16), - ('offset', Int64))))) + ('messages', MessageSet))))) ) |
