compression.lz4.level — Kafka Broker Configuration
The compression level to use if compression.type is set to 'lz4'.
Description
The compression level to use if compression.type is set to 'lz4'.
Default Values by Kafka Version
| Component | Kafka version line | Documented default |
|---|---|---|
| Broker | 3.8 | 9 |
| Broker | 3.9 | 9 |
| Broker | 4.0 | 9 |
| Broker | 4.1 | 9 |
| Broker | 4.2 | 9 |
| Broker | 4.3 | 9 |
| Broker | 4.4 | 9 |
| Producer | 3.8 | 9 |
| Producer | 3.9 | 9 |
| Producer | 4.0 | 9 |
| Producer | 4.1 | 9 |
| Producer | 4.2 | 9 |
| Producer | 4.3 | 9 |
| Producer | 4.4 | 9 |
| topic | 3.8 | 9 |
| topic | 3.9 | 9 |
| topic | 4.0 | 9 |
| topic | 4.1 | 9 |
| topic | 4.2 | 9 |
| topic | 4.3 | 9 |
| topic | 4.4 | 9 |
Tuning Recommendation
Workload-dependent proposals, not benchmarked defaults. Review the versioned Config Advisor before applying.
| Profile | Proposal | Rationale and tradeoff |
|---|---|---|
| producer / throughput | 1 | Selects the LZ4 compression effort when LZ4 is enabled. Java accepts levels 1 through 17; 9 is the default, not the maximum. Tradeoff: Changing the level trades compression effort against compressed size. Java and librdkafka levels have different ranges and are not performance-equivalent. Reference · 2026-10-27 |
Related Configs
Manage Kafka configs across all your clusters with Conduktor Console — view, compare, and update configurations in one place.