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
| Component | Kafka version line | Documented default |
|---|---|---|
| Producer | 0.8.1 | 1048576 |
| Producer | 0.8.2 | 1048576 |
| Producer | 0.9.0 | 1048576 |
| Producer | 0.10.0 | 1048576 |
| Producer | 0.10.1 | 1048576 |
| Producer | 0.10.2 | 1048576 |
| Producer | 0.11.0 | 1048576 |
| Producer | 1.0 | 1048576 |
| Producer | 1.1 | 1048576 |
| Producer | 2.0 | 1048576 |
| Producer | 2.1 | 1048576 |
| Producer | 2.2 | 1048576 |
| Producer | 2.3 | 1048576 |
| Producer | 2.4 | 1048576 |
| Producer | 2.5 | 1048576 |
| Producer | 2.6 | 1048576 |
| Producer | 2.7 | 1048576 |
| Producer | 2.8 | 1048576 |
| Producer | 3.0 | 1048576 |
| Producer | 3.1 | 1048576 |
| Producer | 3.2 | 1048576 |
| Producer | 3.3 | 1048576 |
| Producer | 3.4 | 1048576 |
| Producer | 3.5 | 1048576 |
| Producer | 3.6 | 1048576 |
| Producer | 3.7 | 1048576 |
| Producer | 3.8 | 1048576 |
| Producer | 3.9 | 1048576 |
| Producer | 4.0 | 1048576 |
| Producer | 4.1 | 1048576 |
| Producer | 4.2 | 1048576 |
| Producer | 4.3 | 1048576 |
| Producer | 4.4 | 1048576 |
Tuning Recommendation
Workload-dependent proposals, not benchmarked defaults. Review the versioned Config Advisor before applying.
| Profile | Proposal | Rationale and tradeoff |
|---|---|---|
| producer / throughput | 5242880 | Limits a Java producer request and effectively the maximum uncompressed record batch. Increase only when record sizes require it. Tradeoff: Broker/topic limits apply to record batches after compression; they are not identical to the whole request limit. Check socket.request.max.bytes separately. Reference · 2026-10-27 |