retries — Kafka Producer Configuration
Setting a value greater than zero will cause the client to resend any request that fails with a potentially transient error. It is recommended to set the value to either zero or `MAX_VALUE` and use corresponding timeout parameters to control how long a client should retry a request.
Description
Setting a value greater than zero will cause the client to resend any request that fails with a potentially transient error. It is recommended to set the value to either zero or `MAX_VALUE` and use corresponding timeout parameters to control how long a client should retry a request.
Default Values by Kafka Version
| Kafka Version | Default Value |
|---|---|
| 0.8.1 | 0 |
| 0.8.2 | 0 |
| 0.9.0 | 0 |
| 0.10.0 | 0 |
| 0.10.1 | 0 |
| 0.10.2 | 0 |
| 0.11.0 | 0 |
| 1.0 | 0 |
| 1.1 | 0 |
| 2.0 | 0 |
| 2.1 | 2147483647 |
| 2.2 | 2147483647 |
| 2.3 | 2147483647 |
| 2.4 | 2147483647 |
| 2.5 | 2147483647 |
| 2.6 | 2147483647 |
| 2.7 | 2147483647 |
| 2.8 | 2147483647 |
| 3.0 | 2147483647 |
| 3.1 | 2147483647 |
| 3.2 | 2147483647 |
| 3.3 | 2147483647 |
| 3.4 | 2147483647 |
| 3.5 | 2147483647 |
| 3.6 | 2147483647 |
| 3.7 | 2147483647 |
| 3.8 | 2147483647 |
| 3.9 | 2147483647 |
| 4.0 | 2147483647 |
| 4.1 | 2147483647 |
| 4.2 | 2147483647 |
Tuning Recommendation
| Profile | Recommended | Why |
|---|---|---|
| producer / throughput | 2147483647 | Keep retries at MAX_INT (default since 2.1) and rely solely on delivery.timeout.ms to bound the total retry window; manually reducing retries can cause silent data loss on transient leader elections. |
| producer / durability | 2147483647 | Keep retries at MAX_INT (default since 2.1) and let delivery.timeout.ms govern the total retry window; manually capping retries can cause silent data loss during transient leader elections or ISR shrinkage events that resolve within seconds. |
Related Configs
acks · enable.idempotence · max.in.flight.requests.per.connection · delivery.timeout.ms · retry.backoff.ms · retry.backoff.max.ms · request.timeout.ms
Manage Kafka configs across all your clusters with Conduktor Console — view, compare, and update configurations in one place.