Migrate deprecated Spring Kafka error handlers

MSAL

Migrate error handlers deprecated in Spring Kafka 2.8.x to their replacements.

org.openrewrite.java.spring.kafka.UpgradeSpringKafka_2_8_ErrorHandlers
mod run . --recipe=org.openrewrite.java.spring.kafka.UpgradeSpringKafka_2_8_ErrorHandlers

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

Recipe list

It runs these recipes, in this order.

  1. Change method name org.springframework.kafka.listener.SeekToCurrentErrorHandler handle(..) to handleRemaining
  2. Change method name org.springframework.kafka.config.AbstractKafkaListenerContainerFactory setErrorHandler(..) to setCommonErrorHandler
  3. Change type SeekToCurrentErrorHandler to DefaultErrorHandler
  4. Change type SeekToCurrentBatchErrorHandler to DefaultErrorHandler
  5. Move DefaultErrorHandler.setBackOff(BackOff) to the constructor