From b4e695d3fafccdfaba2b97b685383aa69ebc0a4e Mon Sep 17 00:00:00 2001 From: GP Date: Wed, 10 Oct 2018 14:05:52 +0530 Subject: [PATCH] Add support for ZStandard compression. This is landing in Kafka 2.1.0, due for release 29th October, 2018. References - 1. https://cwiki.apache.org/confluence/display/KAFKA/KIP-110%3A+Add+Codec+for+ZStandard+Compression 2. https://issues.apache.org/jira/browse/KAFKA-4514 3. https://github.com/apache/kafka/pull/2267 4. https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=91554044 --- src/protocol/message/compression/index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/protocol/message/compression/index.js b/src/protocol/message/compression/index.js index 9ca8c8261..723c03de7 100644 --- a/src/protocol/message/compression/index.js +++ b/src/protocol/message/compression/index.js @@ -8,6 +8,7 @@ const Types = { GZIP: 1, Snappy: 2, LZ4: 3, + ZSTD: 4, } const Codecs = { @@ -18,6 +19,9 @@ const Codecs = { [Types.LZ4]: () => { throw new KafkaJSNotImplemented('LZ4 compression not implemented') }, + [Types.ZSTD]: () => { + throw new KafkaJSNotImplemented('ZSTD compression not implemented') + }, } const lookupCodec = type => (Codecs[type] ? Codecs[type]() : null)