@FunctionalInterface
public interface KafkaListenerErrorHandler
@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) throws java.lang.Exception
message
- the spring-messaging message.exception
- the exception the listener threw, wrapped in a
ListenerExecutionFailedException
.@SendTo
annotation.java.lang.Exception
- an exception which may be the original or different.default java.lang.Object handleError(org.springframework.messaging.Message<?> message, ListenerExecutionFailedException exception, org.apache.kafka.clients.consumer.Consumer<?,?> consumer) throws java.lang.Exception
message
- the spring-messaging message.exception
- the exception the listener threw, wrapped in a
ListenerExecutionFailedException
.consumer
- the consumer.@SendTo
annotation.java.lang.Exception
- an exception which may be the original or different.