apupier commented on code in PR #24096:
URL: https://github.com/apache/camel/pull/24096#discussion_r3433946705


##########
components/camel-kafka/src/main/docs/kafka-component.adoc:
##########
@@ -220,27 +269,38 @@ In case you want to force manual commits, you can use 
`KafkaManualCommit` API fr
 This requires turning on manual commits by either setting the option 
`allowManualCommit` to `true` on the `KafkaComponent`
 or on the endpoint, for example:
 
+._Java-only: programmatic component configuration_
 [source,java]
 ----
 KafkaComponent kafka = new KafkaComponent();
 kafka.setAutoCommitEnable(false);
 kafka.setAllowManualCommit(true);
-// ...
 camelContext.addComponent("kafka", kafka);
 ----
 
+Or using configuration properties:
+
+[source,properties]
+----
+camel.component.kafka.auto-commit-enable=false
+camel.component.kafka.allow-manual-commit=true
+----
+
 By default, it uses the `NoopCommitManager` behind the scenes. To commit an 
offset, you will
-require you to use the `KafkaManualCommit` from Java code such as a Camel 
`Processor`:
+need to use the `KafkaManualCommit` from Java code such as a Camel `Processor`:
 
+._Java-only: manual commit processor_
 [source,java]
 ----
 public void process(Exchange exchange) {
     KafkaManualCommit manual =
-        exchange.getIn().getHeader(KafkaConstants.MANUAL_COMMIT, 
KafkaManualCommit.class);
+        exchange.getIn().getHeader("CamelKafkaManualCommit", 
KafkaManualCommit.class);

Review Comment:
   shoudl use the Java constant instead of the string.
   
   it will avoid to have code to change in case the header is renamed



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