Class ContainerStoppingErrorHandler
java.lang.Object
org.springframework.kafka.listener.KafkaExceptionLogLevelAware
org.springframework.kafka.listener.ContainerStoppingErrorHandler
- All Implemented Interfaces:
ConsumerAwareErrorHandler,ContainerAwareErrorHandler,ErrorHandler,GenericErrorHandler<org.apache.kafka.clients.consumer.ConsumerRecord<?,,?>> RemainingRecordsErrorHandler
@Deprecated
public class ContainerStoppingErrorHandler
extends KafkaExceptionLogLevelAware
implements ContainerAwareErrorHandler
Deprecated.
A container error handler that stops the container after an exception
is thrown by the listener.
- Since:
- 2.1
-
Constructor Summary
ConstructorsConstructorDescriptionDeprecated.Construct an instance with a defaultSimpleAsyncTaskExecutor.ContainerStoppingErrorHandler(Executor executor) Deprecated.Construct an instance with the providedExecutor. -
Method Summary
Modifier and TypeMethodDescriptionvoidhandle(Exception thrownException, List<org.apache.kafka.clients.consumer.ConsumerRecord<?, ?>> records, org.apache.kafka.clients.consumer.Consumer<?, ?> consumer, MessageListenerContainer container) Deprecated.Handle the exception.Methods inherited from class org.springframework.kafka.listener.KafkaExceptionLogLevelAware
getLogLevel, setLogLevelMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.kafka.listener.ConsumerAwareErrorHandler
handleMethods inherited from interface org.springframework.kafka.listener.ContainerAwareErrorHandler
handleMethods inherited from interface org.springframework.kafka.listener.GenericErrorHandler
clearThreadState, isAckAfterHandle, setAckAfterHandleMethods inherited from interface org.springframework.kafka.listener.RemainingRecordsErrorHandler
handle
-
Constructor Details
-
ContainerStoppingErrorHandler
public ContainerStoppingErrorHandler()Deprecated.Construct an instance with a defaultSimpleAsyncTaskExecutor. -
ContainerStoppingErrorHandler
Deprecated.Construct an instance with the providedExecutor.- Parameters:
executor- the executor.
-
-
Method Details
-
handle
public void handle(Exception thrownException, List<org.apache.kafka.clients.consumer.ConsumerRecord<?, ?>> records, org.apache.kafka.clients.consumer.Consumer<?, ?> consumer, MessageListenerContainer container) Deprecated.Description copied from interface:ErrorHandlerHandle the exception.- Specified by:
handlein interfaceConsumerAwareErrorHandler- Specified by:
handlein interfaceContainerAwareErrorHandler- 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.
-
CommonContainerStoppingErrorHandler.