public class SeekToCurrentBatchErrorHandler extends java.lang.Object implements ContainerAwareBatchErrorHandler
| Constructor and Description |
|---|
SeekToCurrentBatchErrorHandler() |
| Modifier and Type | Method and Description |
|---|---|
void |
clearThreadState()
Optional method to clear thread state; will be called just before a consumer
thread terminates.
|
void |
handle(java.lang.Exception thrownException,
org.apache.kafka.clients.consumer.ConsumerRecords<?,?> data,
org.apache.kafka.clients.consumer.Consumer<?,?> consumer,
MessageListenerContainer container)
Handle the exception.
|
void |
setBackOff(org.springframework.util.backoff.BackOff backOff)
Set a
BackOff to suspend the thread after performing the seek. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waithandlehandlepublic void setBackOff(org.springframework.util.backoff.BackOff backOff)
BackOff to suspend the thread after performing the seek. Since this
error handler can never "recover" after retries are exhausted, if the back off
returns STOP, then the previous interval is used.backOff - the back off.public void handle(java.lang.Exception thrownException,
org.apache.kafka.clients.consumer.ConsumerRecords<?,?> data,
org.apache.kafka.clients.consumer.Consumer<?,?> consumer,
MessageListenerContainer container)
BatchErrorHandlerhandle in interface BatchErrorHandlerhandle in interface ConsumerAwareBatchErrorHandlerhandle in interface ContainerAwareBatchErrorHandlerthrownException - the exception.data - the consumer records.consumer - the consumer.container - the container.public void clearThreadState()
GenericErrorHandlerclearThreadState in interface GenericErrorHandler<org.apache.kafka.clients.consumer.ConsumerRecords<?,?>>