You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "davsclaus (via GitHub)" <gi...@apache.org> on 2026/06/17 16:03:16 UTC

[PR] CAMEL-23789: Improve camel-kafka docs with multi-DSL tabs [camel]

davsclaus opened a new pull request, #24096:
URL: https://github.com/apache/camel/pull/24096

   ## Summary
   
   _Claude Code on behalf of Claus Ibsen_
   
   Improves the `camel-kafka` component documentation to be multi-DSL friendly, as part of [CAMEL-23789](https://issues.apache.org/jira/browse/CAMEL-23789).
   
   - **Added XML/YAML tabs** to 12 route examples that were previously Java-only (header deserializer/serializer, header filter strategy, JMS interop, producing messages, OAuth auth, SSL config, offset management, producer performance aggregate, idempotent repository, SSLContextParameters)
   - **Resolved Java constants** to string values in code examples (`KafkaConstants.KEY` → `"CamelKafkaKey"`, `KafkaConstants.MANUAL_COMMIT` → `"CamelKafkaManualCommit"`, `KafkaTestUtil.MOCK_RESULT` → `"mock:result"`) with TIP notes pointing to the Java constant
   - **Removed string concatenation** and `fromF()` patterns, replacing with plain URIs
   - **Extracted routes from RouteBuilder wrappers** (offset management, SSL via SSLContextParameters)
   - **Added `_Java-only:` markers** (18 total) to inherently Java examples (lambda processors, programmatic component config, custom classes)
   - **Added configuration property alternatives** alongside programmatic Java component configuration (breakOnFirstError, manual commit, shutdown timeout, Kerberos)
   
   ### Before / After
   | Metric | Before | After |
   |--------|--------|-------|
   | Tabs blocks | 6 | 18 |
   | Java-only markers | 0 | 18 |
   | Unresolved Java constants in code | 5 | 0 |
   | String concatenation in examples | 3 | 0 |
   
   ## Test plan
   - [ ] Verify the AsciiDoc renders correctly (tabs blocks balanced, markers display properly)
   - [ ] Verify XML examples use `&amp;` for query parameter separators
   - [ ] Verify YAML examples use proper indentation and parameter structure
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-23789: Improve camel-kafka docs with multi-DSL tabs [camel]

Posted by "apupier (via GitHub)" <gi...@apache.org>.
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-23789: Improve camel-kafka docs with multi-DSL tabs [camel]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #24096:
URL: https://github.com/apache/camel/pull/24096#issuecomment-4735987542

   <!-- ci-tested-modules -->
   :test_tube: **CI tested the following changed modules:**
   
   - `components/camel-kafka`
   
   :warning: **Some tests are disabled on GitHub Actions** (`@DisabledIfSystemProperty(named = "ci.env.name")`) and require manual verification:
   
   - `components/camel-kafka`: 2 test(s) disabled on GitHub Actions
   
   <details><summary>All tested modules (8 modules)</summary>
   
   - Camel :: JBang :: MCP
   - Camel :: JBang :: Plugin :: Route Parser
   - Camel :: JBang :: Plugin :: TUI
   - Camel :: JBang :: Plugin :: Validate
   - Camel :: Kafka
   - Camel :: Launcher :: Container
   - Camel :: YAML DSL :: Validator
   - Camel :: YAML DSL :: Validator Maven Plugin
   
   </details>
   
   ---
   :gear: [View full build and test results](https://github.com/apache/camel/actions/runs/27702523309)


-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-23789: Improve camel-kafka docs with multi-DSL tabs [camel]

Posted by "davsclaus (via GitHub)" <gi...@apache.org>.
davsclaus merged PR #24096:
URL: https://github.com/apache/camel/pull/24096


-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-23789: Improve camel-kafka docs with multi-DSL tabs [camel]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #24096:
URL: https://github.com/apache/camel/pull/24096#issuecomment-4733412863

   :star2: Thank you for your contribution to the Apache Camel project! :star2:
     :robot: CI automation will test this PR automatically.
   
     :camel: Apache Camel Committers, please review the following items:
   
     * First-time contributors **require MANUAL approval** for the GitHub Actions to run
     * You can use the command `/component-test (camel-)component-name1 (camel-)component-name2..` to request a test from the test bot although they are normally detected and executed by CI.
     * You can label PRs using `skip-tests` and `test-dependents` to fine-tune the checks executed by this PR.
     * Build and test logs are available in the summary page. **Only** [Apache Camel committers](https://camel.apache.org/community/team/#committers) have access to the summary.
     
     :warning: Be careful when sharing logs. Review their contents before sharing them publicly.


-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org