Uses of Interface
org.springframework.kafka.listener.CommonErrorHandler
Packages that use CommonErrorHandler
Package
Description
Package for kafka configuration
Package for kafka listeners
Package for retryable topic handling.
-
Uses of CommonErrorHandler in org.springframework.kafka.config
Methods in org.springframework.kafka.config with parameters of type CommonErrorHandlerModifier and TypeMethodDescriptionvoid
AbstractKafkaListenerContainerFactory.setCommonErrorHandler
(CommonErrorHandler commonErrorHandler) Set theCommonErrorHandler
which can handle errors for both record and batch listeners. -
Uses of CommonErrorHandler in org.springframework.kafka.listener
Classes in org.springframework.kafka.listener that implement CommonErrorHandlerModifier and TypeClassDescriptionclass
ACommonErrorHandler
that stops the container when an error occurs.class
An error handler that delegates to different error handlers, depending on the exception type.class
TheCommonErrorHandler
implementation for logging exceptions.class
ACommonErrorHandler
that delegates to differentCommonErrorHandler
s for record and batch listeners.class
An error handler that, for record listeners, seeks to the current offset for each topic in the remaining records.Methods in org.springframework.kafka.listener that return CommonErrorHandlerModifier and TypeMethodDescriptionAbstractMessageListenerContainer.getCommonErrorHandler()
Get theCommonErrorHandler
.protected CommonErrorHandler
FailedBatchProcessor.getFallbackBatchHandler()
Return the fallback batch error handler.Methods in org.springframework.kafka.listener with parameters of type CommonErrorHandlerModifier and TypeMethodDescriptionvoid
CommonDelegatingErrorHandler.addDelegate
(Class<? extends Throwable> throwable, CommonErrorHandler handler) Add a delegate to the end of the current collection.static void
ErrorHandlingUtils.retryBatch
(Exception thrownException, org.apache.kafka.clients.consumer.ConsumerRecords<?, ?> records, org.apache.kafka.clients.consumer.Consumer<?, ?> consumer, MessageListenerContainer container, Runnable invokeListener, BackOff backOff, CommonErrorHandler seeker, BiConsumer<org.apache.kafka.clients.consumer.ConsumerRecords<?, ?>, Exception> recoverer, LogAccessor logger, KafkaException.Level logLevel, List<RetryListener> retryListeners, org.springframework.classify.BinaryExceptionClassifier classifier, boolean reClassifyOnExceptionChange) Retry a complete batch by pausing the consumer and then, in a loop, poll the consumer, wait for the next back off, then call the listener.void
AbstractMessageListenerContainer.setCommonErrorHandler
(CommonErrorHandler commonErrorHandler) Set theCommonErrorHandler
which can handle errors for both record and batch listeners.Method parameters in org.springframework.kafka.listener with type arguments of type CommonErrorHandlerModifier and TypeMethodDescriptionvoid
CommonDelegatingErrorHandler.setErrorHandlers
(Map<Class<? extends Throwable>, CommonErrorHandler> delegates) Set the delegate error handlers; aLinkedHashMap
argument is recommended so that the delegates are searched in a known order.Constructors in org.springframework.kafka.listener with parameters of type CommonErrorHandlerModifierConstructorDescriptionCommonDelegatingErrorHandler
(CommonErrorHandler defaultErrorHandler) Construct an instance with a default error handler that will be invoked if the exception has no matches.CommonMixedErrorHandler
(CommonErrorHandler recordErrorHandler, CommonErrorHandler batchErrorHandler) Construct an instance with the provided delegateCommonErrorHandler
s.FailedBatchProcessor
(BiConsumer<org.apache.kafka.clients.consumer.ConsumerRecord<?, ?>, Exception> recoverer, BackOff backOff, BackOffHandler backOffHandler, CommonErrorHandler fallbackHandler) Construct an instance with the provided properties.FailedBatchProcessor
(BiConsumer<org.apache.kafka.clients.consumer.ConsumerRecord<?, ?>, Exception> recoverer, BackOff backOff, CommonErrorHandler fallbackHandler) Construct an instance with the provided properties. -
Uses of CommonErrorHandler in org.springframework.kafka.retrytopic
Methods in org.springframework.kafka.retrytopic that return CommonErrorHandlerModifier and TypeMethodDescriptionprotected CommonErrorHandler
ListenerContainerFactoryConfigurer.createErrorHandler
(DeadLetterPublishingRecoverer deadLetterPublishingRecoverer)