retry.backoff.max.ms — Kafka Consumer Configuration
The maximum amount of time in milliseconds to wait when retrying a request to the broker that has repeatedly failed. If provided, the backoff per client will increase exponentially for each failed request, up to this maximum.
Description
The maximum amount of time in milliseconds to wait when retrying a request to the broker that has repeatedly failed. If provided, the backoff per client will increase exponentially for each failed request, up to this maximum. To prevent all clients from being synchronized upon retry, a randomized jitter with a factor of 0.2 will be applied to the backoff, resulting in the backoff falling within a range between 20% below and 20% above the computed value. If retry.backoff.ms is set to be higher than retry.backoff.max.ms, then retry.backoff.max.ms will be used as a constant backoff from the beginning without any exponential increase
Default Values by Kafka Version
| Kafka Version | Default Value |
|---|---|
| 3.7 | 1000 (1 second) |
| 3.8 | 1000 (1 second) |
| 3.9 | 1000 (1 second) |
| 4.0 | 1000 (1 second) |
| 4.1 | 1000 (1 second) |
| 4.2 | 1000 (1 second) |
Tuning Recommendation
| Profile | Recommended | Why |
|---|---|---|
| producer / throughput | 5000 | Capping exponential backoff at 5s instead of 1s prevents retry storms during extended broker outages while still retrying frequently enough to recover quickly once the broker returns. |
| producer / durability | 5000 | Capping exponential backoff at 5s instead of 1s prevents retry storms during extended broker outages while allowing fast recovery (first retry at 200ms, then exponential growth) once the broker returns. Within a 300s delivery window this yields ~40 retry attempts. |
Related Configs
retries · delivery.timeout.ms · retry.backoff.ms