[ 
https://issues.apache.org/jira/browse/CAMEL-18627?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17620446#comment-17620446
 ] 

Otavio Rodolfo Piske commented on CAMEL-18627:
----------------------------------------------

[~geek.rupam] thanks for the report. Can you provide the stack trace, please?

> camel-kafka: Kafka resume throws null pointer exception if no partition 
> offset exists
> -------------------------------------------------------------------------------------
>
>                 Key: CAMEL-18627
>                 URL: https://issues.apache.org/jira/browse/CAMEL-18627
>             Project: Camel
>          Issue Type: Task
>          Components: camel-kafka
>    Affects Versions: 3.18.3
>            Reporter: rupam
>            Assignee: Otavio Rodolfo Piske
>            Priority: Minor
>             Fix For: 3.20.0
>
>
>  
> In the startPolling() method, if the consumer is suspending, then the 
> unsubscribe method is called which permanently closes the consumer
>  
> {code:java}
>     Duration pollDuration = Duration.ofMillis(pollTimeoutMs);
>     while (isKafkaConsumerRunnable() && isConnected() && 
> pollExceptionStrategy.canContinue()) {
>         ConsumerRecords<Object, Object> allRecords = 
> consumer.poll(pollDuration);
>         if (consumerListener != null) {
>             if (!consumerListener.afterConsume(consumer)) {
>                 continue;
>             }
>         }
>         ProcessingResult result = 
> recordProcessorFacade.processPolledRecords(allRecords);
>         if (result.isBreakOnErrorHit()) {
>             LOG.debug("We hit an error ... setting flags to force reconnect");
>             // force re-connect
>             setReconnect(true);
>             setConnected(false);
>         }
>         updateTaskState();
>     }
>     if (!isConnected()) {
>         LOG.debug("Not reconnecting, check whether to auto-commit or not 
> ...");
>         commitManager.commit();
>     }
>     safeUnsubscribe();
> } catch (InterruptException e) {{code}
>  
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to