...
- Producer compresses the user-given messages.
- Broker recompresses the user-given messages with specified compression.type per broker or topic.
- records with the specified compression codec and level.
- When the broker receives records
- if the topic compression codec is "producer" or matches the codec used by the producer, records are appended to the logs. If the producer used a different compression level, records are not recompressed.
- otherwise the broker recompresses the records with specified compression codec and level
- .
Compressing the records with the given compression type and level works like the following:
...