orpiske commented on code in PR #8499:
URL: https://github.com/apache/camel/pull/8499#discussion_r990967060


##########
components/camel-kafka/src/main/java/org/apache/camel/component/kafka/consumer/support/KafkaRecordProcessor.java:
##########
@@ -131,8 +131,11 @@ private boolean processException(
                 LOG.warn("Will seek consumer to offset {} and start polling 
again.", partitionLastOffset);
             }
 
-            // force commit, so we resume on next poll where we failed
-            commitManager.forceCommit(partition, partitionLastOffset);
+            // force commit, so we resume on next poll where we failed except 
when the failure happened
+            // at the first message in a poll
+            if(partitionLastOffset != -1) {

Review Comment:
   Please use `AbstractCommitManager.START_OFFSET` instead of -1, so it's 
easier to read. 
   
   
   Thanks!



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to