0

The Spring Cloud Stream Kafka Binder Reference Guide states that, in a batch consumer, a SeekToCurrentBatchErrorHandler can be configured to implement a retry functionality. SeekToCurrentBatchErrorHandler, however, is deprecated in favor of DefaultErrorHandler. So what is the correct way to get a repeat behavior in a batch consumer of Spring Cloud Stream Kafka?

Gianni
  • 35
  • 4

1 Answers1

2

See Legacy Error Handlers and Their Replacements.

SeekToCurrentBatchErrorHandler

No replacement, use DefaultErrorHandler with an infinite BackOff.

However, there are better ways to handle errors with batch listeners; see https://docs.spring.io/spring-kafka/docs/current/reference/html/#annotation-error-handling

The SCSt documentation should be updated; I suggest you open an issue there https://github.com/spring-cloud/spring-cloud-stream/issues

Gary Russell
  • 166,535
  • 14
  • 146
  • 179