conduktor.io ↗

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.

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. If conflicting configurations are set and idempotence is not explicitly enabled, idempotence is disabled.

Default Values by Kafka Version

Kafka VersionDefault Value
0.9.05
0.10.05
0.10.15
0.10.25
0.11.05
1.05
1.15
2.05
2.15
2.25
2.35
2.45
2.55
2.65
2.75
2.85
3.05
3.15
3.25
3.35
3.45
3.55
3.65
3.75
3.85
3.95
4.05
4.15
4.25

Tuning Recommendation

ProfileRecommendedWhy
producer / throughput5The default of 5 is already the safe maximum with enable.idempotence=true (idempotence guarantees deduplication for up to 5 in-flight batches per partition); going higher would disable idempotence and risk reordering on retry.
producer / latency5Keep at 5 (default): pipelining 5 in-flight requests per broker connection saturates the TCP pipe without waiting for previous acks, minimizing head-of-line blocking and keeping request latency low even when brokers are slightly slow to respond.
producer / durability5The idempotent producer guarantees ordering and deduplication for up to 5 in-flight batches per partition; keeping the default of 5 preserves throughput while maintaining idempotence. Reducing to 1 is only needed if idempotence is disabled.

Related Configs

acks · enable.idempotence · retries

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