You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (Jira)" <ji...@apache.org> on 2022/10/07 03:38:00 UTC

[jira] [Updated] (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:all-tabpanel ]

Claus Ibsen updated CAMEL-18587:
--------------------------------
    Priority: Minor  (was: Major)

> 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
>            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)