You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Otavio Rodolfo Piske (Jira)" <ji...@apache.org> on 2022/10/12 06:33:00 UTC
[jira] [Commented] (CAMEL-18587) Kafka Consumer closes on any exception if breakOnFirstError is set to TRUE
[ https://issues.apache.org/jira/browse/CAMEL-18587?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17616216#comment-17616216 ]
Otavio Rodolfo Piske commented on CAMEL-18587:
----------------------------------------------
[~geek.rupam] thank you for the fix! I assigned the ticket to me - as your profile on Jira is not yet available for ticket assignment. I'll eval and, if needed, backport this to 3.18 codebase.
> Kafka Consumer closes on any exception if breakOnFirstError is set to TRUE
> --------------------------------------------------------------------------
>
> Key: CAMEL-18587
> URL: https://issues.apache.org/jira/browse/CAMEL-18587
> Project: Camel
> Issue Type: Bug
> Components: camel-kafka
> Affects Versions: 3.18.0
> Reporter: rupam
> Assignee: Otavio Rodolfo Piske
> Priority: Minor
>
> 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)