If the broker "compression.type" is "producer", then the broker retains
the original compression codec set by the producer.
If the producer and broker codecs are different, then broker recompress
the data using broker "compression.type".
On Wed, Feb 14, 2018 at 10:58 AM, Uddhav Arote <aroteudd...@gmail.com>
> Hi Kafka users,
> I am trying to understand the behavior of compression in Kafka. Consider a
> scenario, where producer sets compression.codec "snappy" and broker's
> compression.code "lz4"?
> In this scenario, what is the behavior of the compression?
> As far as I have understood is the following,
> The messages compressed by the producer are wrapped in the wrapper message
> and send to the broker. If the broker compression.codec is "producer", the
> message is written as is to the log.
> In the code,
> what I understand is that if the producer and broker codecs are not same,
> then the compression should happen again.
> But I am not sure about this. Can somebody tell me how this works?