Package org.apache.camel.component.kafka
Interface PollExceptionStrategy
-
- All Known Implementing Classes:
DefaultPollExceptionStrategy
public interface PollExceptionStrategy
Strategy to decide when a Kafka exception was thrown during polling, how to handle this. For example by re-connecting and polling the same message again, by stopping the consumer (allows to re-balance and let another consumer try), or to let Camel route the message as an exception which allows Camel error handling to handle the exception, or to discard this message and poll the next message.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description PollOnError
handleException(Exception exception)
Controls how to handle the exception while polling from Kafka.
-
-
-
Method Detail
-
handleException
PollOnError handleException(Exception exception)
Controls how to handle the exception while polling from Kafka.- Parameters:
exception
- the caused exception which typically would be aKafkaException
- Returns:
- how to handle the exception
-
-