From c394c833db836b6b0013e309152604ce4b3ea515 Mon Sep 17 00:00:00 2001 From: Dominic Evans Date: Thu, 16 Jan 2020 23:23:36 +0000 Subject: [PATCH] fix: fill in the Fetch{Request,Response} protocol In order to consume zstd-compressed records the consumer needs to send and receive version 10 FetchRequest/FetchResponses, but they need to do so in a well-formed manner that adheres to the encoding format. Ref: https://kafka.apache.org/protocol Signed-off-by: Dominic Evans --- fetch_request.go | 1 + fetch_response.go | 1 + 2 files changed, 2 insertions(+) diff --git a/fetch_request.go b/fetch_request.go index 836e6dec1c..58130e0cd7 100644 --- a/fetch_request.go +++ b/fetch_request.go @@ -228,6 +228,7 @@ func (r *FetchRequest) version() int16 { return r.Version } +// FIXME: get these correct func (r *FetchRequest) requiredVersion() KafkaVersion { switch r.Version { case 0: diff --git a/fetch_response.go b/fetch_response.go index 11e4543bae..36a020bc1c 100644 --- a/fetch_response.go +++ b/fetch_response.go @@ -324,6 +324,7 @@ func (r *FetchResponse) version() int16 { return r.Version } +// FIXME: get these correct func (r *FetchResponse) requiredVersion() KafkaVersion { switch r.Version { case 0: