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, wait
handle, handle
handle
isAckAfterHandle
public 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)
BatchErrorHandler
handle
in interface BatchErrorHandler
handle
in interface ConsumerAwareBatchErrorHandler
handle
in interface ContainerAwareBatchErrorHandler
thrownException
- the exception.data
- the consumer records.consumer
- the consumer.container
- the container.public void clearThreadState()
GenericErrorHandler
clearThreadState
in interface GenericErrorHandler<org.apache.kafka.clients.consumer.ConsumerRecords<?,?>>