davsclaus opened a new pull request, #3265:
URL: https://github.com/apache/camel-kamelets/pull/3265
Part of #3261: Citrus tests for the seven Kafka Kamelets that had none. As
in #3262, each route records the body type (`X-Body-Type`) and the
`Content-Type` (`X-Content-Type`) the Kamelet gives, for #3117.
**Without a broker** (`kafkarouter`, in `CommonIT`):
| Kamelet | Test | Body after the Kamelet |
|---|---|---|
| `is-tombstone-filter-action` | An empty first message is dropped; the
second passes | `String` |
| `set-kafka-key-action` | `CamelKafkaKey` is the value of the `customer`
header | `String` |
| `value-to-key-action` | `CamelKafkaKey` is `{id=7}`, from the `id` field |
`InputStreamCache`, `application/json` |
| `message-timestamp-router-action` | `ts` of `1720000000000` with
`$[topic]-$[timestamp]` routes to `orders-20240703` | `InputStreamCache`,
`application/json` |
**With Redpanda** (`kafka`, in `KafkaIT`):
| Kamelet | Test |
|---|---|
| `kafka-batch-source` with `kafka-batch-manual-commit-action` | Three
records come as one message whose body is a `List` of three. The action passes
it on unchanged |
| `kafka-manual-commit-action` with `kafka-source` | The source sets
`CamelKafkaManualCommit` with `allowManualCommit: true`, and the action passes
the record on unchanged |
The batch test sends the records before the route starts, so the first poll
gets all three.
**For a later fix:** `kafka-batch-source` says "Each entry is a message of
its own". The entries of the `List` are Camel `Exchange` objects, so a step
reads an entry with `getMessage().getBody()`. Its description should say so.
### Tests
`CommonIT#kafkaRouter` and `KafkaIT`: 13 of 13 pass, the existing ones among
them.
Under a high load (other builds running), the existing
`kafka-source-route-test` once timed out after the 10 seconds `KafkaIT` gives
its HTTP server, and passed on the next run.
`./mvnw clean verify` from the root passes.
_Claude Code on behalf of Claus Ibsen_
🤖 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]