Interface BatchErrorHandler
-
- All Superinterfaces:
GenericErrorHandler<org.apache.kafka.clients.consumer.ConsumerRecords<?,?>>
- All Known Subinterfaces:
ConsumerAwareBatchErrorHandler
,ContainerAwareBatchErrorHandler
,ListenerInvokingBatchErrorHandler
- All Known Implementing Classes:
BatchLoggingErrorHandler
,ConditionalDelegatingBatchErrorHandler
,ContainerStoppingBatchErrorHandler
,RecoveringBatchErrorHandler
,RetryingBatchErrorHandler
,SeekToCurrentBatchErrorHandler
public interface BatchErrorHandler extends GenericErrorHandler<org.apache.kafka.clients.consumer.ConsumerRecords<?,?>>
Handles errors thrown during the execution of aBatchMessageListener
. The listener should communicate which position(s) in the list failed in the exception.- Since:
- 1.1
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default void
handle(java.lang.Exception thrownException, org.apache.kafka.clients.consumer.ConsumerRecords<?,?> data, org.apache.kafka.clients.consumer.Consumer<?,?> consumer, MessageListenerContainer container)
Handle the exception.default void
handle(java.lang.Exception thrownException, org.apache.kafka.clients.consumer.ConsumerRecords<?,?> data, org.apache.kafka.clients.consumer.Consumer<?,?> consumer, MessageListenerContainer container, java.lang.Runnable invokeListener)
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, @Nullable org.apache.kafka.clients.consumer.ConsumerRecords<?,?> data, org.apache.kafka.clients.consumer.Consumer<?,?> consumer, MessageListenerContainer container)
Handle the exception.- Parameters:
thrownException
- the exception.data
- the consumer records.consumer
- the consumer.container
- the container.
-
handle
default void handle(java.lang.Exception thrownException, @Nullable org.apache.kafka.clients.consumer.ConsumerRecords<?,?> data, org.apache.kafka.clients.consumer.Consumer<?,?> consumer, MessageListenerContainer container, java.lang.Runnable invokeListener)
Handle the exception.- Parameters:
thrownException
- the exception.data
- the consumer records.consumer
- the consumer.container
- the container.invokeListener
- a callback to re-invoke the listener.- Since:
- 2.3.7
-
-