Interface ContainerAwareBatchErrorHandler
-
- All Superinterfaces:
BatchErrorHandler,ConsumerAwareBatchErrorHandler,GenericErrorHandler<org.apache.kafka.clients.consumer.ConsumerRecords<?,?>>
- All Known Subinterfaces:
ListenerInvokingBatchErrorHandler
- All Known Implementing Classes:
ConditionalDelegatingBatchErrorHandler,ContainerStoppingBatchErrorHandler,RecoveringBatchErrorHandler,RetryingBatchErrorHandler,SeekToCurrentBatchErrorHandler
- 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 ContainerAwareBatchErrorHandler extends ConsumerAwareBatchErrorHandler
An error handler that has access to the batch of records from the last poll the consumer, and the container.- Since:
- 2.1
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default voidhandle(java.lang.Exception thrownException, org.apache.kafka.clients.consumer.ConsumerRecords<?,?> data, org.apache.kafka.clients.consumer.Consumer<?,?> consumer)Handle the exception.voidhandle(java.lang.Exception thrownException, org.apache.kafka.clients.consumer.ConsumerRecords<?,?> data, org.apache.kafka.clients.consumer.Consumer<?,?> consumer, MessageListenerContainer container)Handle the exception.default voidhandle(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.ConsumerAwareBatchErrorHandler
handle
-
Methods inherited from interface org.springframework.kafka.listener.GenericErrorHandler
clearThreadState, 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)Description copied from interface:GenericErrorHandlerHandle the exception.- Specified by:
handlein interfaceConsumerAwareBatchErrorHandler- Specified by:
handlein interfaceGenericErrorHandler<org.apache.kafka.clients.consumer.ConsumerRecords<?,?>>- Parameters:
thrownException- The exception.data- the data.consumer- the consumer.
-
handle
void handle(java.lang.Exception thrownException, @Nullable org.apache.kafka.clients.consumer.ConsumerRecords<?,?> data, org.apache.kafka.clients.consumer.Consumer<?,?> consumer, MessageListenerContainer container)Description copied from interface:BatchErrorHandlerHandle the exception.- Specified by:
handlein interfaceBatchErrorHandler- Specified by:
handlein interfaceConsumerAwareBatchErrorHandler- 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, @Nullable java.lang.Runnable invokeListener)Handle the exception.- Specified by:
handlein interfaceBatchErrorHandler- 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
-
-