max.in.flight.requests.per.connection — Kafka Producer Configuration
The maximum number of unacknowledged requests the client will send on a single connection before blocking. Note that if this configuration is set to be greater than 1 and enable.idempotence is set to false, there is a risk of message reordering after a failed send due to retries (i.e., if retries are enabled); if retries are disabled or if enable.idempotence is set to true, ordering will be preserved
Description
The maximum number of unacknowledged requests the client will send on a single connection before blocking. Note that if this configuration is set to be greater than 1 and enable.idempotence is set to false, there is a risk of message reordering after a failed send due to retries (i.e., if retries are enabled); if retries are disabled or if enable.idempotence is set to true, ordering will be preserved. Additionally, enabling idempotence requires the value of this configuration to be less than or equal to 5, because broker only retains at most 5 batches for each producer. If the value is more than 5, previous batches may be removed on broker side.
Default Values by Kafka Version
| Component | Kafka version line | Documented default |
|---|---|---|
| Producer | 0.9.0 | 5 |
| Producer | 0.10.0 | 5 |
| Producer | 0.10.1 | 5 |
| Producer | 0.10.2 | 5 |
| Producer | 0.11.0 | 5 |
| Producer | 1.0 | 5 |
| Producer | 1.1 | 5 |
| Producer | 2.0 | 5 |
| Producer | 2.1 | 5 |
| Producer | 2.2 | 5 |
| Producer | 2.3 | 5 |
| Producer | 2.4 | 5 |
| Producer | 2.5 | 5 |
| Producer | 2.6 | 5 |
| Producer | 2.7 | 5 |
| Producer | 2.8 | 5 |
| Producer | 3.0 | 5 |
| Producer | 3.1 | 5 |
| Producer | 3.2 | 5 |
| Producer | 3.3 | 5 |
| Producer | 3.4 | 5 |
| Producer | 3.5 | 5 |
| Producer | 3.6 | 5 |
| Producer | 3.7 | 5 |
| Producer | 3.8 | 5 |
| Producer | 3.9 | 5 |
| Producer | 4.0 | 5 |
| Producer | 4.1 | 5 |
| Producer | 4.2 | 5 |
| Producer | 4.3 | 5 |
| Producer | 4.4 | 5 |
Tuning Recommendation
Workload-dependent proposals, not benchmarked defaults. Review the versioned Config Advisor before applying.
| Profile | Proposal | Rationale and tradeoff |
|---|---|---|
| producer / throughput | 5 | Controls request pipelining per broker connection. Java idempotent production supports at most five in-flight requests. Tradeoff: Without idempotence, retries with more than one in-flight request can reorder records. Serializing requests reduces concurrency. Reference · 2026-10-27 |
| producer / latency | 5 | Controls request pipelining per broker connection. Java idempotent production supports at most five in-flight requests. Tradeoff: Without idempotence, retries with more than one in-flight request can reorder records. Serializing requests reduces concurrency. Reference · 2026-10-27 |
| producer / durability | 5 | Controls request pipelining per broker connection. Java idempotent production supports at most five in-flight requests. Tradeoff: Without idempotence, retries with more than one in-flight request can reorder records. Serializing requests reduces concurrency. Reference · 2026-10-27 |
Related Configs
acks · enable.idempotence · retries