rgala commented on a change in pull request #7275:
URL: https://github.com/apache/camel/pull/7275#discussion_r836341710



##########
File path: 
components/camel-kafka/src/main/java/org/apache/camel/component/kafka/consumer/CommitManagers.java
##########
@@ -34,13 +34,7 @@ public static CommitManager createCommitManager(
         }
 
         if (configuration.isAutoCommitEnable()) {
-            if ("async".equals(configuration.getAutoCommitOnStop())) {
-                return new AsyncCommitManager(consumer, kafkaConsumer, 
threadId, printableTopic);
-            } else if ("sync".equals(configuration.getAutoCommitOnStop())) {
-                return new SyncCommitManager(consumer, kafkaConsumer, 
threadId, printableTopic);
-            } else if ("none".equals(configuration.getAutoCommitOnStop())) {
-                return new NoopCommitManager(consumer, kafkaConsumer, 
threadId, printableTopic);
-            }
+            return new AsyncCommitManager(consumer, kafkaConsumer, threadId, 
printableTopic);

Review comment:
       I don't think it is needed because no matter what the commit manager 
does, the offset will be handled automatically on consumer close. Wouldn't it 
be better to return NoopCommitManager here?




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