@FunctionalInterface
public interface KafkaListenerErrorHandler
@KafkaListener
method
throws an exception. This is invoked higher up the stack than the
listener container's error handler. For methods annotated with
@SendTo
, the error handler can return a result.Modifier and Type | Method and Description |
---|---|
java.lang.Object |
handleError(org.springframework.messaging.Message<?> message,
ListenerExecutionFailedException exception)
Handle the error.
|
default java.lang.Object |
handleError(org.springframework.messaging.Message<?> message,
ListenerExecutionFailedException exception,
org.apache.kafka.clients.consumer.Consumer<?,?> consumer)
Handle the error.
|
java.lang.Object handleError(org.springframework.messaging.Message<?> message, ListenerExecutionFailedException exception)
message
- the spring-messaging message.exception
- the exception the listener threw, wrapped in a
ListenerExecutionFailedException
.@SendTo
annotation.default java.lang.Object handleError(org.springframework.messaging.Message<?> message, ListenerExecutionFailedException exception, org.apache.kafka.clients.consumer.Consumer<?,?> consumer)
message
- the spring-messaging message.exception
- the exception the listener threw, wrapped in a
ListenerExecutionFailedException
.consumer
- the consumer.@SendTo
annotation.