You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "rupam (Jira)" <ji...@apache.org> on 2022/10/06 03:28:00 UTC
[jira] [Created] (CAMEL-18588) Kafka consumer on any exception should repoll records after the committed offset
rupam created CAMEL-18588:
-----------------------------
Summary: Kafka consumer on any exception should repoll records after the committed offset
Key: CAMEL-18588
URL: https://issues.apache.org/jira/browse/CAMEL-18588
Project: Camel
Issue Type: Bug
Components: camel-kafka
Affects Versions: 3.18.0
Reporter: rupam
In KafkaFetchRecords' startPolling method , if breakOnErrorHit is true, the KafkaConsumer closes instead of pausing.
{code:java}
while (isKafkaConsumerRunnableAndNotStopped() && isConnected() && pollExceptionStrategy.canContinue()) {
ConsumerRecords<Object, Object> allRecords = consumer.poll(pollDuration);
if (consumerListener != null) {
if (!consumerListener.afterConsume(consumer)) {
continue;
}
}
ProcessingResult result = recordProcessorFacade.processPolledRecords(allRecords, lastResult);
if (result.isBreakOnErrorHit()) {
LOG.debug("We hit an error ... setting flags to force reconnect");
// force re-connect
setReconnect(true);
setConnected(false);
} else {
lastResult = result;
}
updateTaskState();
}{code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)