Interface ErrorHandler
-
- All Superinterfaces:
GenericErrorHandler<org.apache.kafka.clients.consumer.ConsumerRecord<?,?>>
- All Known Subinterfaces:
ConsumerAwareErrorHandler
,ContainerAwareErrorHandler
,RemainingRecordsErrorHandler
- All Known Implementing Classes:
LoggingErrorHandler
public interface ErrorHandler extends GenericErrorHandler<org.apache.kafka.clients.consumer.ConsumerRecord<?,?>>
Handles errors thrown during the execution of aMessageListener
.
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default void
handle(java.lang.Exception thrownException, java.util.List<org.apache.kafka.clients.consumer.ConsumerRecord<?,?>> records, org.apache.kafka.clients.consumer.Consumer<?,?> consumer, MessageListenerContainer container)
Handle the exception.-
Methods inherited from interface org.springframework.kafka.listener.GenericErrorHandler
clearThreadState, handle, handle, isAckAfterHandle, setAckAfterHandle
-
-
-
-
Method Detail
-
handle
default void handle(java.lang.Exception thrownException, java.util.List<org.apache.kafka.clients.consumer.ConsumerRecord<?,?>> records, org.apache.kafka.clients.consumer.Consumer<?,?> consumer, MessageListenerContainer container)
Handle the exception.- Parameters:
thrownException
- the exception.records
- the remaining records including the one that failed.consumer
- the consumer.container
- the container.
-
-