conduktor.io ↗

max.request.size — Kafka Producer Configuration

The maximum size of a request in bytes. This setting will limit the number of record batches the producer will send in a single request to avoid sending huge requests.

Description

The maximum size of a request in bytes. This setting will limit the number of record batches the producer will send in a single request to avoid sending huge requests. This is also effectively a cap on the maximum uncompressed record batch size. Note that the server has its own cap on the record batch size (after compression if compression is enabled) which may be different from this.

Default Values by Kafka Version

Kafka VersionDefault Value
0.8.11048576
0.8.21048576
0.9.01048576
0.10.01048576
0.10.11048576
0.10.21048576
0.11.01048576
1.01048576
1.11048576
2.01048576
2.11048576
2.21048576
2.31048576
2.41048576
2.51048576
2.61048576
2.71048576
2.81048576
3.01048576
3.11048576
3.21048576
3.31048576
3.41048576
3.51048576
3.61048576
3.71048576
3.81048576
3.91048576
4.01048576
4.11048576
4.21048576

Tuning Recommendation

ProfileRecommendedWhy
producer / throughput5242880Raising the max request size to 5MB allows larger compressed batches to be sent in a single ProduceRequest, reducing round-trips and fully exploiting batch.size=128KB at high message rates.

Related Configs

batch.size · compression.type

Manage Kafka configs across all your clusters with Conduktor Console — view, compare, and update configurations in one place.