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

   _Claude Code on behalf of Claus Ibsen_
   
   A batch of Kamelets rewritten to the documentation standard proposed in 
#3140, `docs/modules/ROOT/pages/documenting.adoc`. Like #3141, each description 
now has:
   - a one-sentence summary as its first paragraph;
   - then `Use it to`, `Input:`, `Output:` and `Good to know:` paragraphs;
   - options with formats and examples.
   
   This batch is the 20 Kafka Kamelets. `kafka-sink` is already in #3140. The 
main gap today is choosing between them. Each summary and `Use it to` paragraph 
now says which one fits: plain, batch or manual commit; secured or not secured; 
Apicurio or Azure registry; JSON Schema or Avro.
   
   ## How each was checked
   
   | Kamelets | Checked |
   |---|---|
   | `kafka-source`, `kafka-batch-source`, both manual-commit actions, 
`is-tombstone-filter-action`, the three router actions, 
`topic-name-matches-filter-action`, `value-to-key-action` | Run against Kafka 
started with `camel infra run kafka`. The JSON ones were also run on 4.22.2 and 
4.23.0. |
   | `kafka-apicurio-registry-not-secured-sink`, 
`kafka-batch-apicurio-registry-not-secured-source` | Run against Kafka and 
Apicurio Registry from `camel infra`. |
   | The Keycloak-secured Apicurio Kamelets and the three Azure schema registry 
Kamelets | Checked against the template and the component documentation. They 
were started only to see how they fail without an account. |
   
   ## Facts that were missing or wrong before
   
   - **`kafka-apicurio-registry-not-secured-source`** reads **JSON Schema** 
records, not Avro, unlike the sink of the same name. The YAML and the partial 
page now say so.
   - **`kafka-batch-source`:**
     - the body is a List of messages, one per record;
     - auto commit is the default, although the description said "commit them 
manually".
   - **`kafka-source`:**
     - without `consumerGroup`, every start uses a new random group;
     - record headers become text, or bytes with `deserializeHeaders=false`.
   - **The router and filter actions** must match the whole topic name. 
`regex-router-action` sets `CamelKafkaOverrideTopic`, which `kafka-sink` 
follows. `timestamp-router-action` dates are UTC, and its default `topicFormat` 
gives `topic-20240703`.
   - **`value-to-key-action`:** the key is a Map, which `kafka-sink` writes as 
text like `{id=7}`, not as JSON.
   - **The Apicurio sink** needs the schema to be registered already as 
`<topic>-value`.
   - **Partial pages:**
     - `kafka-source` claimed `NONE` was the default `saslAuthType`; there is 
none.
     - `kafka-batch-apicurio-registry-source` claimed SASL/SSL.
     - Several examples were missing required options.
   
   ## Found on the way, not changed here (template changes for their own PRs)
   
   - **The three Azure schema registry Kamelets cannot start.** The template 
uses `#bean:defaultAzureCredential`, but a template bean gets a unique name, so 
the lookup fails with `NoSuchBeanException`. It should be 
`#bean:{{defaultAzureCredential}}`, as `kafka-batch-source` does for its commit 
bean. Their `specificAvroValueType` is also needed but not `required`.
   - **Apicurio sources with a `mvn:io.quarkus:quarkus-apicurio-registry-*` 
dependency do not start on Camel JBang** ("No available 
ApicurioHttClientProvider provider found"). They do with 
`--dep=mvn:io.apicurio:apicurio-registry-serdes-avro-serde:2.4.14.Final`. They 
may work on Quarkus only.
   - **`kafka-sink` prefers the `key`/`kafka-key` headers over 
`CamelKafkaKey`.** So in kafka-source → value-to-key-action (or 
set-kafka-key-action) → kafka-sink, the record keeps its original key.
   - **On Camel 4.24, `message-timestamp-router-action` and 
`value-to-key-action` fail** with `Content-Type: application/json`. The `json` 
data format is Jackson 3 there, and cannot build the Jackson 2 `JsonNode` the 
template asks for. They work on 4.22 and 4.23.
   - **`saslAuthType`:** `kafka-source` has no default and requires it, while 
`kafka-batch-source` defaults to `NONE`.
   
   ## Notes for review
   
   - No template, type, default or required list was changed. The one new 
`enum`, on `pollOnError`, matches the component's `PollOnError` values. The 
`dataTypes` blocks are `headers` only, with no `default`, so they change 
nothing at runtime.
   - `KameletsCatalogTest.testSupportedHeaders`: `kafka-source` 9 → 10. The 
catalog now returns the headers the Kamelet declares instead of those of the 
Kafka component.
   - This PR is based on `main`; if #3140 merges first, I will rebase it and 
regenerate the index.
   
   `./mvnw clean install` from the root passes.
   
   🤖 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: [email protected]

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

Reply via email to