Class ReconnectErrorStrategy
- java.lang.Object
-
- org.apache.camel.component.kafka.consumer.errorhandler.ReconnectErrorStrategy
-
- All Implemented Interfaces:
PollExceptionStrategy
public class ReconnectErrorStrategy extends Object implements PollExceptionStrategy
-
-
Constructor Summary
Constructors Constructor Description ReconnectErrorStrategy(KafkaFetchRecords recordFetcher)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanContinue()This method provides an "answer" to whether the consumer can continue polling or not.voidhandle(long partitionLastOffset, Exception exception)Controls how to handle the exception while polling from Kafka.voidreset()Reset any error flags set by a previous error condition
-
-
-
Constructor Detail
-
ReconnectErrorStrategy
public ReconnectErrorStrategy(KafkaFetchRecords recordFetcher)
-
-
Method Detail
-
reset
public void reset()
Description copied from interface:PollExceptionStrategyReset any error flags set by a previous error condition- Specified by:
resetin interfacePollExceptionStrategy
-
canContinue
public boolean canContinue()
Description copied from interface:PollExceptionStrategyThis method provides an "answer" to whether the consumer can continue polling or not. This is specific to each polling exception strategy and must be implemented accordingly- Specified by:
canContinuein interfacePollExceptionStrategy- Returns:
- true if polling should continue or false otherwise
-
handle
public void handle(long partitionLastOffset, Exception exception)Description copied from interface:PollExceptionStrategyControls how to handle the exception while polling from Kafka.- Specified by:
handlein interfacePollExceptionStrategyexception- the caused exception which typically would be aKafkaException
-
-