Interface ContainerAwareErrorHandler
- All Superinterfaces:
ConsumerAwareErrorHandler,ErrorHandler,GenericErrorHandler<org.apache.kafka.clients.consumer.ConsumerRecord<?,,?>> RemainingRecordsErrorHandler
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@Deprecated(since="2.8",
forRemoval=true)
@FunctionalInterface
public interface ContainerAwareErrorHandler
extends RemainingRecordsErrorHandler
Deprecated, for removal: This API element is subject to removal in a future version.
An error handler that has access to the unprocessed records from the last poll
(including the failed record), the consumer, and the container.
The records passed to the handler will not be passed to the listener
(unless re-fetched if the handler performs seeks).
- Since:
- 2.1
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidhandle(Exception thrownException, List<org.apache.kafka.clients.consumer.ConsumerRecord<?, ?>> records, org.apache.kafka.clients.consumer.Consumer<?, ?> consumer) Deprecated, for removal: This API element is subject to removal in a future version.Handle the exception.voidhandle(Exception thrownException, List<org.apache.kafka.clients.consumer.ConsumerRecord<?, ?>> records, org.apache.kafka.clients.consumer.Consumer<?, ?> consumer, MessageListenerContainer container) Deprecated, for removal: This API element is subject to removal in a future version.Handle the exception.Methods inherited from interface org.springframework.kafka.listener.ConsumerAwareErrorHandler
handleMethods inherited from interface org.springframework.kafka.listener.GenericErrorHandler
clearThreadState, isAckAfterHandle, setAckAfterHandleMethods inherited from interface org.springframework.kafka.listener.RemainingRecordsErrorHandler
handle
-
Method Details
-
handle
default void handle(Exception thrownException, @Nullable List<org.apache.kafka.clients.consumer.ConsumerRecord<?, ?>> records, org.apache.kafka.clients.consumer.Consumer<?, ?> consumer) Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:RemainingRecordsErrorHandlerHandle the exception. The failed record is the first in the list.- Specified by:
handlein interfaceRemainingRecordsErrorHandler- Parameters:
thrownException- the exception.records- the remaining records including the one that failed.consumer- the consumer.
-
handle
void handle(Exception thrownException, @Nullable List<org.apache.kafka.clients.consumer.ConsumerRecord<?, ?>> records, org.apache.kafka.clients.consumer.Consumer<?, ?> consumer, MessageListenerContainer container) Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:ErrorHandlerHandle the exception.- Specified by:
handlein interfaceConsumerAwareErrorHandler- Specified by:
handlein interfaceErrorHandler- Specified by:
handlein interfaceRemainingRecordsErrorHandler- Parameters:
thrownException- the exception.records- the remaining records including the one that failed.consumer- the consumer.container- the container.
-
CommonErrorHandler.