Interface ManualAckListenerErrorHandler
- 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 ManualAckListenerErrorHandler
extends KafkaListenerErrorHandler
A
KafkaListenerErrorHandler
that supports manual acks.- Since:
- 2.9
- Author:
- Gary Russell
-
Method Summary
Modifier and TypeMethodDescriptiondefault Object
handleError
(Message<?> message, ListenerExecutionFailedException exception) Handle the error.handleError
(Message<?> message, ListenerExecutionFailedException exception, org.apache.kafka.clients.consumer.Consumer<?, ?> consumer, Acknowledgment ack) Handle the error.Methods inherited from interface org.springframework.kafka.listener.KafkaListenerErrorHandler
handleError
-
Method Details
-
handleError
Description copied from interface:KafkaListenerErrorHandler
Handle the error.- Specified by:
handleError
in 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
@SendTo
annotation.
-
handleError
Object handleError(Message<?> message, ListenerExecutionFailedException exception, org.apache.kafka.clients.consumer.Consumer<?, ?> consumer, @Nullable Acknowledgment ack) Description copied from interface:KafkaListenerErrorHandler
Handle the error.- Specified by:
handleError
in interfaceKafkaListenerErrorHandler
- Parameters:
message
- the spring-messaging message.exception
- the exception the listener threw, wrapped in aListenerExecutionFailedException
.consumer
- the consumer.ack
- theAcknowledgment
.- Returns:
- the return value is ignored unless the annotated method has a
@SendTo
annotation.
-