davsclaus opened a new pull request, #28418:
URL: https://github.com/apache/camel/pull/28418
_Claude Code on behalf of davsclaus_
This group adds the catalog body types (CAMEL-24961) for twelve components:
- the six debezium components: debezium-db2, -mongodb, -mysql, -oracle,
-postgres and -sqlserver;
- flowable, camunda, bonita, flink, spring-batch and optaplanner.
Each change is an `@BodyTypes` annotation on the Endpoint, plus the JSON it
generates and the catalog copy. The optaplanner doc page had its body text
corrected.
**What the catalog says now**
| Component | Consumer | Reply of the consumer | Producer input | Producer
output |
|---|---|---|---|---|
| debezium-db2, -mysql, -oracle, -postgres, -sqlserver | the row after the
change as a Kafka Connect `Struct`, which converts to a Map (its toString is
not JSON); no body for a delete, a tombstone or a schema change; the operation,
the key, the row before and the DDL are headers | | | |
| debezium-mongodb | the document as JSON text; no body for a delete, a
tombstone, or an update when captureMode does not look up the full document | |
| |
| flowable | the outbound event as text, JSON or XML by the channel | | the
inbound event as text, or a Jackson `JsonNode` | unchanged |
| camunda | a `JobWorkerMessage` (JSON text with formatJSON) | `any`: the
job is completed, and a Map body becomes its output variables | the request
object, or its JSON as text; a `JobWorkerMessage` for the job operations; text,
bytes or a stream for deployResource | the response object (JSON text with
formatJSON) |
| bonita | | | a Map of the contract inputs | unchanged |
| flink | | | `any`: the payload of the callback; a List is one payload per
element | `unknown`: what the callback returns |
| spring-batch | | | `any`: the job parameters are headers | the
`JobExecution` |
| optaplanner | no body: the best solution is the
CamelOptaPlannerBestSolution header | | a planning solution, or a
`ProblemChange` | the best solution; unchanged for a ProblemChange |
**Checked at runtime.** Throwaway tests, not part of the PR, sent text,
bytes, a stream, a file, a Map, a POJO and no body. The setups:
- **debezium:** postgres 17 with pgoutput, and a MongoDB 7 replica set, as
Testcontainers.
- **flowable:** the embedded engine.
- **camunda:** a mocked service (there is no test-infra for it).
- **bonita:** WireMock.
- **flink:** a local Flink environment.
- **spring-batch:** an in-memory job repository.
- **optaplanner:** the CloudBalance example, solved in process.
Not run: the db2, mysql, oracle and sqlserver connectors (they share the
base code that postgres ran), the schema change events, and the real Camunda
client.
**Choices**
- The debezium bodies depend on additionalProperties, as an SMT given
through it changes the body.
- The output of flink is `unknown`, as the callback of the user decides it.
**Doc fix**
- **optaplanner:** a body that is not a solution or a ProblemChange fails;
the page said it gives the best result of the solver. The consumer's body is
empty, with the solution in a header.
PR #21800 changes code of camel-bonita and camel-flowable, but not their
Endpoint classes or generated files.
**Bugs found, not fixed here.** The JIRAs, one per component, will follow.
- **All debezium connectors:** with the ExtractNewRecordState or
ExtractNewDocumentState SMT, the body and the operation header are always null,
as the flattened record has no `after` field and the error is swallowed. The
row is lost.
- **debezium-mongodb:**
- The `patch` fallback is dead code, so with captureMode=change_streams an
update has a null body, and its update description is not exposed.
- mongodbPassword is required, and without mongodbUser the engine fails,
even for a connection string that needs no user.
- **debezium common:** `toMap` does not convert the Structs inside lists or
arrays.
- **flowable:**
- A producer route that starts before the channel is deployed fails every
send with a NullPointerException.
- The page gives the URI as `flowable-event://`, but the scheme is
`flowable`.
- **camunda:**
- JSON as bytes or a stream is rejected with "data missing".
- The consumer's JSON uses camelCase, while the producer uses snake_case.
- A failed client call does not fail the exchange.
- **bonita:**
- The id of the started case is thrown away.
- JSON text fails with the misleading "The contract input is null".
- **flink:**
- The component options dataStream and dataStreamCallback are ignored.
- A DataStream callback needs collect=false, which is not the default.
- **spring-batch:** any header with a null value fails the exchange, as
Spring Batch 6 rejects null parameters.
- **optaplanner:**
- With configFile and no solverManager, a new SolverManager is built for
every exchange and never closed, so threads leak.
- The solvers and listeners are kept in static maps keyed by problemId
only.
- Sync mode sends no events to the consumers.
**Local checks**
- The changed modules build, with no change to the generated files after the
build.
- The catalog copies equal their modules.
- camel-catalog, camel-yaml-dsl-validator and camel-jbang-core tests pass.
- The Endpoint and Component DSLs regenerate with no change.
🤖 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]