Interface ConsumerAwareListenerErrorHandler
-
- All Superinterfaces:
KafkaListenerErrorHandler
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface ConsumerAwareListenerErrorHandler extends KafkaListenerErrorHandler
An error handler that has access to the consumer, for example to adjust offsets after an error.- Since:
- 2.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default java.lang.ObjecthandleError(org.springframework.messaging.Message<?> message, ListenerExecutionFailedException exception)Handle the error.java.lang.ObjecthandleError(org.springframework.messaging.Message<?> message, ListenerExecutionFailedException exception, org.apache.kafka.clients.consumer.Consumer<?,?> consumer)Handle the error.
-
-
-
Method Detail
-
handleError
default java.lang.Object handleError(org.springframework.messaging.Message<?> message, ListenerExecutionFailedException exception)Description copied from interface:KafkaListenerErrorHandlerHandle the error.- Specified by:
handleErrorin interfaceKafkaListenerErrorHandler- Parameters:
message- the spring-messaging message.exception- the exception the listener threw, wrapped in aListenerExecutionFailedException.- Returns:
- the return value is ignored unless the annotated method has a
@SendToannotation.
-
handleError
java.lang.Object handleError(org.springframework.messaging.Message<?> message, ListenerExecutionFailedException exception, org.apache.kafka.clients.consumer.Consumer<?,?> consumer)Description copied from interface:KafkaListenerErrorHandlerHandle the error.- Specified by:
handleErrorin interfaceKafkaListenerErrorHandler- Parameters:
message- the spring-messaging message.exception- the exception the listener threw, wrapped in aListenerExecutionFailedException.consumer- the consumer.- Returns:
- the return value is ignored unless the annotated method has a
@SendToannotation.
-
-