Migrate deprecated Kafka Streams retries to task.timeout.ms

Proprietary

In Kafka 2.7, the Kafka Streams retries setting (StreamsConfig.RETRIES_CONFIG) was deprecated in favor of task.timeout.ms (StreamsConfig.TASK_TIMEOUT_MS_CONFIG), and Kafka 4.0 removed the constant. This recipe replaces the retries setting with a task timeout, attempting to preserve the retry budget by multiplying retries × retry.backoff.ms. If no backoff is configured, or the budget cannot be computed, it falls back to 60000ms (1 minute). When task.timeout.ms is already set, retries is removed. retry.backoff.ms remains a valid Kafka Streams setting and is left in place. Only Kafka Streams configuration is changed: the producer, consumer and admin client retries remain valid.

io.moderne.kafka.streams.MigrateRetryConfiguration
mod run . --recipe=io.moderne.kafka.streams.MigrateRetryConfiguration

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.