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 TypeMethodDescriptionvoidAbstractKafkaListenerContainerFactory.setCommonErrorHandler(CommonErrorHandler commonErrorHandler) Set theCommonErrorHandlerwhich 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 TypeClassDescriptionclassACommonErrorHandlerthat stops the container when an error occurs.classAn error handler that delegates to different error handlers, depending on the exception type.classTheCommonErrorHandlerimplementation for logging exceptions.classACommonErrorHandlerthat delegates to differentCommonErrorHandlers for record and batch listeners.classAn 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 CommonErrorHandlerFailedBatchProcessor.getFallbackBatchHandler()Return the fallback batch error handler.Methods in org.springframework.kafka.listener with parameters of type CommonErrorHandlerModifier and TypeMethodDescriptionvoidCommonDelegatingErrorHandler.addDelegate(Class<? extends Throwable> throwable, CommonErrorHandler handler) Add a delegate to the end of the current collection.static voidErrorHandlingUtils.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) 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.voidAbstractMessageListenerContainer.setCommonErrorHandler(CommonErrorHandler commonErrorHandler) Set theCommonErrorHandlerwhich can handle errors for both record and batch listeners.Method parameters in org.springframework.kafka.listener with type arguments of type CommonErrorHandlerModifier and TypeMethodDescriptionvoidCommonDelegatingErrorHandler.setErrorHandlers(Map<Class<? extends Throwable>, CommonErrorHandler> delegates) Set the delegate error handlers; aLinkedHashMapargument 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 delegateCommonErrorHandlers.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 CommonErrorHandlerListenerContainerFactoryConfigurer.createErrorHandler(DeadLetterPublishingRecoverer deadLetterPublishingRecoverer, org.springframework.kafka.retrytopic.ListenerContainerFactoryConfigurer.Configuration configuration)