Spring Cloud Stream Kafka retries 10 times the maxAttempts

Solution 1:

The default error handler in the listener container is now a SeekToCurrentErrorHandler with 10 delivery attempts.

You can either disable the retries in the binder, and configure a STCEH with the retry semantics you want, or use retries in the binder and replace the default error handler with a simple LoggingErrorHandler.

To configure the container's error handler, add a ListenerContainerCustomizer<AbstractKafkaListenerContainerFactory> @Bean.