Class ContainerStoppingBatchErrorHandler
java.lang.Object
org.springframework.kafka.listener.KafkaExceptionLogLevelAware
org.springframework.kafka.listener.ContainerStoppingBatchErrorHandler
- All Implemented Interfaces:
BatchErrorHandler,ConsumerAwareBatchErrorHandler,ContainerAwareBatchErrorHandler,GenericErrorHandler<org.apache.kafka.clients.consumer.ConsumerRecords<?,?>>
@Deprecated
public class ContainerStoppingBatchErrorHandler
extends KafkaExceptionLogLevelAware
implements ContainerAwareBatchErrorHandler
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 aSimpleAsyncTaskExecutor.ContainerStoppingBatchErrorHandler(Executor executor) Deprecated.Construct an instance with the providedExecutor. -
Method Summary
Modifier and TypeMethodDescriptionvoidhandle(Exception thrownException, org.apache.kafka.clients.consumer.ConsumerRecords<?, ?> data, 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.ConsumerAwareBatchErrorHandler
handleMethods inherited from interface org.springframework.kafka.listener.ContainerAwareBatchErrorHandler
handle, handleMethods inherited from interface org.springframework.kafka.listener.GenericErrorHandler
clearThreadState, isAckAfterHandle, setAckAfterHandle
-
Constructor Details
-
ContainerStoppingBatchErrorHandler
public ContainerStoppingBatchErrorHandler()Deprecated.Construct an instance with aSimpleAsyncTaskExecutor. -
ContainerStoppingBatchErrorHandler
Deprecated.Construct an instance with the providedExecutor.- Parameters:
executor- the executor.
-
-
Method Details
-
handle
public void handle(Exception thrownException, @Nullable org.apache.kafka.clients.consumer.ConsumerRecords<?, ?> data, org.apache.kafka.clients.consumer.Consumer<?, ?> consumer, MessageListenerContainer container) Deprecated.Description copied from interface:BatchErrorHandlerHandle the exception.- Specified by:
handlein interfaceBatchErrorHandler- Specified by:
handlein interfaceConsumerAwareBatchErrorHandler- Specified by:
handlein interfaceContainerAwareBatchErrorHandler- Parameters:
thrownException- the exception.data- the consumer records.consumer- the consumer.container- the container.
-
CommonContainerStoppingErrorHandler.