This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel.git
commit 00d9924639e65d01445ec375b6cb364b3481b721 Author: Claus Ibsen <[email protected]> AuthorDate: Sat Oct 24 19:57:09 2026 +0200 CAMEL-24961: Catalog body types for the six debezium components, flowable, camunda, bonita, flink, spring-batch and optaplanner (#28418) Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Signed-off-by: Claus Ibsen <[email protected]> --- .../apache/camel/catalog/components/bonita.json | 4 +++ .../apache/camel/catalog/components/camunda.json | 6 +++++ .../camel/catalog/components/debezium-db2.json | 3 +++ .../camel/catalog/components/debezium-mongodb.json | 3 +++ .../camel/catalog/components/debezium-mysql.json | 3 +++ .../camel/catalog/components/debezium-oracle.json | 3 +++ .../catalog/components/debezium-postgres.json | 3 +++ .../catalog/components/debezium-sqlserver.json | 3 +++ .../org/apache/camel/catalog/components/flink.json | 4 +++ .../apache/camel/catalog/components/flowable.json | 5 ++++ .../camel/catalog/components/optaplanner.json | 5 ++++ .../camel/catalog/components/spring-batch.json | 4 +++ .../camel/catalog/docs/optaplanner-component.adoc | 22 +++++++++------- .../org/apache/camel/component/bonita/bonita.json | 4 +++ .../camel/component/bonita/BonitaEndpoint.java | 11 ++++++++ .../apache/camel/component/camunda/camunda.json | 6 +++++ .../camel/component/camunda/CamundaEndpoint.java | 30 ++++++++++++++++++++++ .../camel/component/debezium/db2/debezium-db2.json | 3 +++ .../debezium/db2/DebeziumDb2Endpoint.java | 9 +++++++ .../debezium/mongodb/debezium-mongodb.json | 3 +++ .../debezium/mongodb/DebeziumMongodbEndpoint.java | 10 ++++++++ .../component/debezium/mysql/debezium-mysql.json | 3 +++ .../debezium/mysql/DebeziumMySqlEndpoint.java | 9 +++++++ .../component/debezium/oracle/debezium-oracle.json | 3 +++ .../debezium/oracle/DebeziumOracleEndpoint.java | 9 +++++++ .../debezium/postgres/debezium-postgres.json | 3 +++ .../postgres/DebeziumPostgresEndpoint.java | 9 +++++++ .../debezium/sqlserver/debezium-sqlserver.json | 3 +++ .../sqlserver/DebeziumSqlserverEndpoint.java | 9 +++++++ .../org/apache/camel/component/flink/flink.json | 4 +++ .../camel/component/flink/FlinkEndpoint.java | 13 ++++++++++ .../apache/camel/component/flowable/flowable.json | 5 ++++ .../camel/component/flowable/FlowableEndpoint.java | 12 +++++++++ .../camel/component/optaplanner/optaplanner.json | 5 ++++ .../src/main/docs/optaplanner-component.adoc | 22 +++++++++------- .../component/optaplanner/OptaPlannerEndpoint.java | 15 +++++++++++ .../camel/component/spring/batch/spring-batch.json | 4 +++ .../spring/batch/SpringBatchEndpoint.java | 9 +++++++ 38 files changed, 263 insertions(+), 18 deletions(-) diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/bonita.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/bonita.json index 3d7ad8367c19..96428a8be75c 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/bonita.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/bonita.json @@ -27,6 +27,10 @@ "lazyStartProducer": { "index": 0, "kind": "property", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail [...] "autowiredEnabled": { "index": 1, "kind": "property", "displayName": "Autowired Enabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching t [...] }, + "bodyTypes": { + "producerIn": { "carriers": [ "map" ], "description": "The contract inputs of the process: a Map of the input names and their Serializable values, a FileInput for a file to upload. Any other body, also JSON text, fails as no contract input: unmarshal it to a Map first" }, + "producerOut": { "carriers": [ "unchanged" ], "description": "The Map of the inputs, in which each FileInput is replaced by a Map of its filename and the tempPath of the upload. The id of the case started is not kept" } + }, "properties": { "operation": { "index": 0, "kind": "path", "displayName": "Operation", "group": "producer", "label": "", "required": true, "type": "enum", "javaType": "org.apache.camel.component.bonita.util.BonitaOperation", "enum": [ "startCase" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.bonita.BonitaConfiguration", "configurationField": "configuration", "description": "Operation to use" }, "hostname": { "index": 1, "kind": "parameter", "displayName": "Hostname", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "localhost", "configurationClass": "org.apache.camel.component.bonita.BonitaConfiguration", "configurationField": "configuration", "description": "Hostname where Bonita engine runs" }, diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/camunda.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/camunda.json index 8d82004f11c5..5035d0dcc5b2 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/camunda.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/camunda.json @@ -45,6 +45,12 @@ "CamelCamundaVersion": { "index": 6, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "int", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The version of a deployed process", "constantName": "org.apache.camel.component.camunda.CamundaConstants#VERSION" }, "CamelCamundaProcessDefinitionKey": { "index": 7, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "long", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The process definition key of a deployed process", "constantName": "org.apache.camel.component.camunda.CamundaConstants#PROCESS_DEFINITION_KEY" } }, + "bodyTypes": { + "consumerOut": { "carriers": [ "pojo" ], "javaType": "org.apache.camel.component.camunda.model.JobWorkerMessage", "byOption": [ { "option": "formatJSON", "value": "true", "carriers": [ "text" ], "javaType": "java.lang.String" } ], "description": "The job of the worker: a JobWorkerMessage with its key, type, custom headers and variables (formatJSON: the same as JSON text). The CamelCamundaJobKey header has the key of the job" }, + "consumerReply": { "carriers": [ "any" ], "description": "When the route ends the job is completed: a Map body gives its entries as the output variables, another body completes it without variables. A route that fails fails the job" }, + "producerIn": { "carriers": [ "pojo", "text", "map", "bytes", "stream", "null" ], "description": "The request of the operation: a request object of org.apache.camel.component.camunda.model, or the same as JSON text with snake_case names. The job operations also take the JobWorkerMessage, or with the CamelCamundaJobKey header a Map of the variables or no body; deployResource takes text, bytes or a stream of the resource with the CamelCamundaResourceName header. JSON as bytes or a stre [...] + "producerOut": { "carriers": [ "pojo" ], "byOption": [ { "option": "formatJSON", "value": "true", "carriers": [ "text" ], "javaType": "java.lang.String" } ], "description": "The response of the operation: a ProcessResponse, MessageResponse, JobResponse or DeploymentResponse, with success false and the error when the call failed (formatJSON: the same as JSON text)" } + }, "properties": { "operationName": { "index": 0, "kind": "path", "displayName": "Operation Name", "group": "common", "label": "common", "required": true, "type": "enum", "javaType": "org.apache.camel.component.camunda.internal.OperationName", "enum": [ "startProcess", "cancelProcess", "publishMessage", "completeJob", "failJob", "updateJobRetries", "worker", "throwError", "deployResource" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The operation t [...] "formatJSON": { "index": 1, "kind": "parameter", "displayName": "Format JSON", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "defaultValue": false, "description": "Format the result in the body as JSON." }, diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/debezium-db2.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/debezium-db2.json index ec46a3c0b968..792f1a8684e7 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/debezium-db2.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/debezium-db2.json @@ -132,6 +132,9 @@ "CamelDebeziumBefore": { "index": 5, "kind": "header", "displayName": "", "group": "consumer", "label": "", "required": false, "javaType": "Struct", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "If presents, contains the state of the row before the event occurred.", "constantName": "org.apache.camel.component.debezium.DebeziumConstants#HEADER_BEFORE" }, "CamelDebeziumDdlSQL": { "index": 6, "kind": "header", "displayName": "", "group": "consumer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "If presents, the ddl sql text of the event.", "constantName": "org.apache.camel.component.debezium.DebeziumConstants#HEADER_DDL_SQL" } }, + "bodyTypes": { + "consumerOut": { "carriers": [ "pojo", "null" ], "javaType": "org.apache.kafka.connect.data.Struct", "dependsOn": [ "additionalProperties" ], "description": "The row after the change as a Kafka Connect Struct, which converts to a Map: convert it before a marshal, as its toString is not JSON. No body for a delete, a tombstone or a schema change event; the operation, the key, the row before the change and the DDL are in headers" } + }, "properties": { "name": { "index": 0, "kind": "path", "displayName": "Name", "group": "consumer", "label": "consumer", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.debezium.db2.configuration.Db2ConnectorEmbeddedDebeziumConfiguration", "configurationField": "configuration", "description": "Unique name for the connector. Attempting to register again [...] "additionalProperties": { "index": 1, "kind": "parameter", "displayName": "Additional Properties", "group": "common", "label": "common", "required": false, "type": "object", "javaType": "java.util.Map<java.lang.String, java.lang.Object>", "prefix": "additionalProperties.", "multiValue": true, "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.debezium.db2.configuration.Db2ConnectorEmbeddedDebeziumConfiguration", "configurationF [...] diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/debezium-mongodb.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/debezium-mongodb.json index 3b34bdec096a..82dbf9653fd4 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/debezium-mongodb.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/debezium-mongodb.json @@ -124,6 +124,9 @@ "CamelDebeziumBefore": { "index": 5, "kind": "header", "displayName": "", "group": "consumer", "label": "", "required": false, "javaType": "Struct", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "If presents, contains the state of the row before the event occurred.", "constantName": "org.apache.camel.component.debezium.DebeziumConstants#HEADER_BEFORE" }, "CamelDebeziumDdlSQL": { "index": 6, "kind": "header", "displayName": "", "group": "consumer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "If presents, the ddl sql text of the event.", "constantName": "org.apache.camel.component.debezium.DebeziumConstants#HEADER_DDL_SQL" } }, + "bodyTypes": { + "consumerOut": { "carriers": [ "text", "null" ], "javaType": "java.lang.String", "format": "json", "dependsOn": [ "additionalProperties" ], "description": "The document after the change as a JSON String (MongoDB extended JSON): unmarshal it to work with its fields. No body for a delete or a tombstone, nor for an update when captureMode does not look up the full document or the document is gone by then; the operation and the key are in headers" } + }, "properties": { "name": { "index": 0, "kind": "path", "displayName": "Name", "group": "consumer", "label": "consumer", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.debezium.mongodb.configuration.MongoDbConnectorEmbeddedDebeziumConfiguration", "configurationField": "configuration", "description": "Unique name for the connector. Attempting to registe [...] "additionalProperties": { "index": 1, "kind": "parameter", "displayName": "Additional Properties", "group": "common", "label": "common", "required": false, "type": "object", "javaType": "java.util.Map<java.lang.String, java.lang.Object>", "prefix": "additionalProperties.", "multiValue": true, "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.debezium.mongodb.configuration.MongoDbConnectorEmbeddedDebeziumConfiguration", "config [...] diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/debezium-mysql.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/debezium-mysql.json index 6251d3f17d9f..b1fd5d4ade56 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/debezium-mysql.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/debezium-mysql.json @@ -166,6 +166,9 @@ "CamelDebeziumBefore": { "index": 5, "kind": "header", "displayName": "", "group": "consumer", "label": "", "required": false, "javaType": "Struct", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "If presents, contains the state of the row before the event occurred.", "constantName": "org.apache.camel.component.debezium.DebeziumConstants#HEADER_BEFORE" }, "CamelDebeziumDdlSQL": { "index": 6, "kind": "header", "displayName": "", "group": "consumer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "If presents, the ddl sql text of the event.", "constantName": "org.apache.camel.component.debezium.DebeziumConstants#HEADER_DDL_SQL" } }, + "bodyTypes": { + "consumerOut": { "carriers": [ "pojo", "null" ], "javaType": "org.apache.kafka.connect.data.Struct", "dependsOn": [ "additionalProperties" ], "description": "The row after the change as a Kafka Connect Struct, which converts to a Map: convert it before a marshal, as its toString is not JSON. No body for a delete, a tombstone or a schema change event; the operation, the key, the row before the change and the DDL are in headers" } + }, "properties": { "name": { "index": 0, "kind": "path", "displayName": "Name", "group": "consumer", "label": "consumer", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.debezium.mysql.configuration.MySqlConnectorEmbeddedDebeziumConfiguration", "configurationField": "configuration", "description": "Unique name for the connector. Attempting to register ag [...] "additionalProperties": { "index": 1, "kind": "parameter", "displayName": "Additional Properties", "group": "common", "label": "common", "required": false, "type": "object", "javaType": "java.util.Map<java.lang.String, java.lang.Object>", "prefix": "additionalProperties.", "multiValue": true, "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.debezium.mysql.configuration.MySqlConnectorEmbeddedDebeziumConfiguration", "configurat [...] diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/debezium-oracle.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/debezium-oracle.json index 137eaed6b6ef..12af9daa1bc3 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/debezium-oracle.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/debezium-oracle.json @@ -193,6 +193,9 @@ "CamelDebeziumBefore": { "index": 5, "kind": "header", "displayName": "", "group": "consumer", "label": "", "required": false, "javaType": "Struct", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "If presents, contains the state of the row before the event occurred.", "constantName": "org.apache.camel.component.debezium.DebeziumConstants#HEADER_BEFORE" }, "CamelDebeziumDdlSQL": { "index": 6, "kind": "header", "displayName": "", "group": "consumer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "If presents, the ddl sql text of the event.", "constantName": "org.apache.camel.component.debezium.DebeziumConstants#HEADER_DDL_SQL" } }, + "bodyTypes": { + "consumerOut": { "carriers": [ "pojo", "null" ], "javaType": "org.apache.kafka.connect.data.Struct", "dependsOn": [ "additionalProperties" ], "description": "The row after the change as a Kafka Connect Struct, which converts to a Map: convert it before a marshal, as its toString is not JSON. No body for a delete, a tombstone or a schema change event; the operation, the key, the row before the change and the DDL are in headers" } + }, "properties": { "name": { "index": 0, "kind": "path", "displayName": "Name", "group": "consumer", "label": "consumer", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.debezium.oracle.configuration.OracleConnectorEmbeddedDebeziumConfiguration", "configurationField": "configuration", "description": "Unique name for the connector. Attempting to register [...] "additionalProperties": { "index": 1, "kind": "parameter", "displayName": "Additional Properties", "group": "common", "label": "common", "required": false, "type": "object", "javaType": "java.util.Map<java.lang.String, java.lang.Object>", "prefix": "additionalProperties.", "multiValue": true, "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.debezium.oracle.configuration.OracleConnectorEmbeddedDebeziumConfiguration", "configur [...] diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/debezium-postgres.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/debezium-postgres.json index 2d1b5fbe7fdf..1c5304388479 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/debezium-postgres.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/debezium-postgres.json @@ -167,6 +167,9 @@ "CamelDebeziumBefore": { "index": 5, "kind": "header", "displayName": "", "group": "consumer", "label": "", "required": false, "javaType": "Struct", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "If presents, contains the state of the row before the event occurred.", "constantName": "org.apache.camel.component.debezium.DebeziumConstants#HEADER_BEFORE" }, "CamelDebeziumDdlSQL": { "index": 6, "kind": "header", "displayName": "", "group": "consumer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "If presents, the ddl sql text of the event.", "constantName": "org.apache.camel.component.debezium.DebeziumConstants#HEADER_DDL_SQL" } }, + "bodyTypes": { + "consumerOut": { "carriers": [ "pojo", "null" ], "javaType": "org.apache.kafka.connect.data.Struct", "dependsOn": [ "additionalProperties" ], "description": "The row after the change as a Kafka Connect Struct, which converts to a Map: convert it before a marshal, as its toString is not JSON. No body for a delete or a tombstone; the operation, the key and the row before the change are in headers" } + }, "properties": { "name": { "index": 0, "kind": "path", "displayName": "Name", "group": "consumer", "label": "consumer", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.debezium.postgres.configuration.PostgresConnectorEmbeddedDebeziumConfiguration", "configurationField": "configuration", "description": "Unique name for the connector. Attempting to regis [...] "additionalProperties": { "index": 1, "kind": "parameter", "displayName": "Additional Properties", "group": "common", "label": "common", "required": false, "type": "object", "javaType": "java.util.Map<java.lang.String, java.lang.Object>", "prefix": "additionalProperties.", "multiValue": true, "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.debezium.postgres.configuration.PostgresConnectorEmbeddedDebeziumConfiguration", "conf [...] diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/debezium-sqlserver.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/debezium-sqlserver.json index b39e8aa153e9..2f933ee0be4d 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/debezium-sqlserver.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/debezium-sqlserver.json @@ -140,6 +140,9 @@ "CamelDebeziumBefore": { "index": 5, "kind": "header", "displayName": "", "group": "consumer", "label": "", "required": false, "javaType": "Struct", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "If presents, contains the state of the row before the event occurred.", "constantName": "org.apache.camel.component.debezium.DebeziumConstants#HEADER_BEFORE" }, "CamelDebeziumDdlSQL": { "index": 6, "kind": "header", "displayName": "", "group": "consumer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "If presents, the ddl sql text of the event.", "constantName": "org.apache.camel.component.debezium.DebeziumConstants#HEADER_DDL_SQL" } }, + "bodyTypes": { + "consumerOut": { "carriers": [ "pojo", "null" ], "javaType": "org.apache.kafka.connect.data.Struct", "dependsOn": [ "additionalProperties" ], "description": "The row after the change as a Kafka Connect Struct, which converts to a Map: convert it before a marshal, as its toString is not JSON. No body for a delete, a tombstone or a schema change event; the operation, the key, the row before the change and the DDL are in headers" } + }, "properties": { "name": { "index": 0, "kind": "path", "displayName": "Name", "group": "consumer", "label": "consumer", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.debezium.sqlserver.configuration.SqlServerConnectorEmbeddedDebeziumConfiguration", "configurationField": "configuration", "description": "Unique name for the connector. Attempting to reg [...] "additionalProperties": { "index": 1, "kind": "parameter", "displayName": "Additional Properties", "group": "common", "label": "common", "required": false, "type": "object", "javaType": "java.util.Map<java.lang.String, java.lang.Object>", "prefix": "additionalProperties.", "multiValue": true, "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.debezium.sqlserver.configuration.SqlServerConnectorEmbeddedDebeziumConfiguration", "co [...] diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/flink.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/flink.json index 63d685be5682..7ed3d102de8c 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/flink.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/flink.json @@ -36,6 +36,10 @@ "CamelFlinkDataStream": { "index": 2, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Object", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The data stream", "constantName": "org.apache.camel.component.flink.FlinkConstants#FLINK_DATASTREAM_HEADER" }, "CamelFlinkDataStreamCallback": { "index": 3, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "org.apache.camel.component.flink.DataStreamCallback", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The data stream callback", "constantName": "org.apache.camel.component.flink.FlinkConstants#FLINK_DATASTREAM_CALLBACK_HEADER" } }, + "bodyTypes": { + "producerIn": { "carriers": [ "any" ], "description": "The body is handed to the DataSet or DataStream callback as its payload, a List as one payload per element; the data to compute on is the DataSet or DataStream of the endpoint or of the CamelFlinkDataSet or CamelFlinkDataStream header" }, + "producerOut": { "carriers": [ "unknown" ], "description": "What the callback returns, null for a void callback. A DataSet it returns is collected into a List; a DataStream it returns fails unless collect is false, then the DataStream (or DataSet) is the body and the CamelFlinkDataStream (or CamelFlinkDataSet) header" } + }, "properties": { "endpointType": { "index": 0, "kind": "path", "displayName": "Endpoint Type", "group": "producer", "label": "", "required": true, "type": "enum", "javaType": "org.apache.camel.component.flink.EndpointType", "enum": [ "dataset", "datastream" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Type of the endpoint (dataset, datastream)." }, "collect": { "index": 1, "kind": "parameter", "displayName": "Collect", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Indicates if results should be collected or counted." }, diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/flowable.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/flowable.json index 90399a04340b..5ee9c3603f1f 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/flowable.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/flowable.json @@ -28,6 +28,11 @@ "lazyStartProducer": { "index": 1, "kind": "property", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail [...] "autowiredEnabled": { "index": 2, "kind": "property", "displayName": "Autowired Enabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching t [...] }, + "bodyTypes": { + "consumerOut": { "carriers": [ "text" ], "javaType": "java.lang.String", "description": "The event a process or case sends on an outbound channel, as text: JSON or XML, as the serializerType of the channel says" }, + "producerIn": { "carriers": [ "text", "pojo" ], "description": "The event for an inbound channel: JSON or XML text, as the deserializerType of the channel expects, or an object whose toString() is that text, such as a Jackson JsonNode. Bytes, a stream or a Map fail: convert them to text first. The headers go along as the headers of the event" }, + "producerOut": { "carriers": [ "unchanged" ] } + }, "properties": { "channelKey": { "index": 0, "kind": "path", "displayName": "Channel Key", "group": "common", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The channel key" }, "bridgeErrorHandler": { "index": 1, "kind": "parameter", "displayName": "Bridge Error Handler", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions (if possible) occurred while the Camel consumer is trying to pickup incoming [...] diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/optaplanner.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/optaplanner.json index a8a30b81c52d..262598ea1771 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/optaplanner.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/optaplanner.json @@ -35,6 +35,11 @@ "CamelOptaPlannerIsSolving": { "index": 3, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "Boolean", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Is solving.", "constantName": "org.apache.camel.component.optaplanner.OptaPlannerConstants#IS_SOLVING" }, "CamelOptaPlannerSolverManager": { "index": 4, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "org.optaplanner.core.api.solver.SolverManager", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Solver Manager.", "constantName": "org.apache.camel.component.optaplanner.OptaPlannerConstants#SOLVER_MANAGER" } }, + "bodyTypes": { + "consumerOut": { "carriers": [ "null" ], "description": "The body is empty: the new best solution is in the CamelOptaPlannerBestSolution header. Events come only from producers that solve asynchronously, with the same problemId" }, + "producerIn": { "carriers": [ "pojo" ], "description": "The planning problem: an instance of the PlanningSolution class of the solver configuration, or a ProblemChange to apply to the problem being solved. Any other body fails to solve, and no body fails" }, + "producerOut": { "carriers": [ "pojo", "unchanged" ], "description": "The best solution found, a new instance of the problem class, with the CamelOptaPlannerIsSolving header false (also with async, the exchange waits for it); a ProblemChange leaves the body unchanged" } + }, "properties": { "problemName": { "index": 0, "kind": "path", "displayName": "Problem Name", "group": "common", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.optaplanner.OptaPlannerConfiguration", "configurationField": "configuration", "description": "Problem name" }, "configFile": { "index": 1, "kind": "parameter", "displayName": "Config File", "group": "common", "label": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.optaplanner.OptaPlannerConfiguration", "configurationField": "configuration", "description": "If SolverManager is absent from the header OptaPlannerConstants.SOLVER_MANAGER then a SolverManager [...] diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/spring-batch.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/spring-batch.json index a1cb0dd49a62..d1c8fbc4e8e9 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/spring-batch.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/spring-batch.json @@ -32,6 +32,10 @@ "headers": { "CamelSpringBatchJobName": { "index": 0, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The name of the Batch Job to use", "constantName": "org.apache.camel.component.spring.batch.SpringBatchConstants#JOB_NAME" } }, + "bodyTypes": { + "producerIn": { "carriers": [ "any" ], "description": "The body is not read: the job parameters are the message headers (Date, Long and Double values as such, other values as text; a null header value fails)" }, + "producerOut": { "carriers": [ "pojo" ], "javaType": "org.springframework.batch.core.job.JobExecution", "description": "The JobExecution of the launched job, with its status and exit status; the headers stay as they were" } + }, "properties": { "jobName": { "index": 0, "kind": "path", "displayName": "Job Name", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The name of the Spring Batch job located in the registry." }, "jobFromHeader": { "index": 1, "kind": "parameter", "displayName": "Job From Header", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Explicitly defines if the jobName should be taken from the headers instead of the URI." }, diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/optaplanner-component.adoc b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/optaplanner-component.adoc index e6045365d74a..9e16f6d14e52 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/optaplanner-component.adoc +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/optaplanner-component.adoc @@ -49,15 +49,19 @@ include::partial$component-endpoint-headers.adoc[] == Message Body -Camel takes the planning problem for the `IN` body, solves it and returns -it on the _OUT_ body. The `IN` body object supports the following use cases: - -* If the body contains the `PlanningSolution` annotation, then it will be solved using the -solver identified by solverId and either synchronously or asynchronously. -* If the body is an instance of `ProblemChange`, then it will trigger -`addProblemFactChange`. -* If the body is none of the above types, then the producer will return -the best result from the solver identified by `solverId`. +Camel takes the planning problem from the message body, solves it and sets +the best solution as the message body. The body supports the following use cases: + +* If the body is an instance of the `PlanningSolution` class of the solver configuration, then it +is solved, either synchronously or asynchronously. In both cases the exchange continues +with the best solution as the body. +* If the body is an instance of `ProblemChange`, then it is added to the problem being solved +with the same `problemId`, and the body is left unchanged. +* Any other body fails the exchange, as the solver cannot solve it. + +The consumer receives an exchange each time a producer solving asynchronously, with the same +`problemId`, finds a new best solution. Its body is empty: the best solution is in the +`CamelOptaPlannerBestSolution` header. === Examples diff --git a/components/camel-bonita/src/generated/resources/META-INF/org/apache/camel/component/bonita/bonita.json b/components/camel-bonita/src/generated/resources/META-INF/org/apache/camel/component/bonita/bonita.json index 3d7ad8367c19..96428a8be75c 100644 --- a/components/camel-bonita/src/generated/resources/META-INF/org/apache/camel/component/bonita/bonita.json +++ b/components/camel-bonita/src/generated/resources/META-INF/org/apache/camel/component/bonita/bonita.json @@ -27,6 +27,10 @@ "lazyStartProducer": { "index": 0, "kind": "property", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail [...] "autowiredEnabled": { "index": 1, "kind": "property", "displayName": "Autowired Enabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching t [...] }, + "bodyTypes": { + "producerIn": { "carriers": [ "map" ], "description": "The contract inputs of the process: a Map of the input names and their Serializable values, a FileInput for a file to upload. Any other body, also JSON text, fails as no contract input: unmarshal it to a Map first" }, + "producerOut": { "carriers": [ "unchanged" ], "description": "The Map of the inputs, in which each FileInput is replaced by a Map of its filename and the tempPath of the upload. The id of the case started is not kept" } + }, "properties": { "operation": { "index": 0, "kind": "path", "displayName": "Operation", "group": "producer", "label": "", "required": true, "type": "enum", "javaType": "org.apache.camel.component.bonita.util.BonitaOperation", "enum": [ "startCase" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.bonita.BonitaConfiguration", "configurationField": "configuration", "description": "Operation to use" }, "hostname": { "index": 1, "kind": "parameter", "displayName": "Hostname", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "localhost", "configurationClass": "org.apache.camel.component.bonita.BonitaConfiguration", "configurationField": "configuration", "description": "Hostname where Bonita engine runs" }, diff --git a/components/camel-bonita/src/main/java/org/apache/camel/component/bonita/BonitaEndpoint.java b/components/camel-bonita/src/main/java/org/apache/camel/component/bonita/BonitaEndpoint.java index c24206e361c2..90f6673ced81 100644 --- a/components/camel-bonita/src/main/java/org/apache/camel/component/bonita/BonitaEndpoint.java +++ b/components/camel-bonita/src/main/java/org/apache/camel/component/bonita/BonitaEndpoint.java @@ -25,6 +25,9 @@ import org.apache.camel.Producer; import org.apache.camel.component.bonita.exception.BonitaException; import org.apache.camel.component.bonita.producer.BonitaStartProducer; import org.apache.camel.component.bonita.util.BonitaOperation; +import org.apache.camel.spi.BodyType; +import org.apache.camel.spi.BodyType.Carrier; +import org.apache.camel.spi.BodyTypes; import org.apache.camel.spi.EndpointServiceLocation; import org.apache.camel.spi.UriEndpoint; import org.apache.camel.spi.UriParam; @@ -35,6 +38,14 @@ import org.apache.camel.support.DefaultEndpoint; */ @UriEndpoint(firstVersion = "2.19.0", scheme = "bonita", title = "Bonita", syntax = "bonita:operation", producerOnly = true, category = { Category.WORKFLOW }) +@BodyTypes(producerIn = @BodyType(value = Carrier.MAP, + description = "The contract inputs of the process: a Map of the input names and their" + + " Serializable values, a FileInput for a file to upload. Any other body," + + " also JSON text, fails as no contract input: unmarshal it to a Map first"), + producerOut = @BodyType(value = Carrier.UNCHANGED, + description = "The Map of the inputs, in which each FileInput is replaced by a Map of its" + + " filename and the tempPath of the upload. The id of the case started is" + + " not kept")) public class BonitaEndpoint extends DefaultEndpoint implements EndpointServiceLocation { @UriParam diff --git a/components/camel-camunda/src/generated/resources/META-INF/org/apache/camel/component/camunda/camunda.json b/components/camel-camunda/src/generated/resources/META-INF/org/apache/camel/component/camunda/camunda.json index 8d82004f11c5..5035d0dcc5b2 100644 --- a/components/camel-camunda/src/generated/resources/META-INF/org/apache/camel/component/camunda/camunda.json +++ b/components/camel-camunda/src/generated/resources/META-INF/org/apache/camel/component/camunda/camunda.json @@ -45,6 +45,12 @@ "CamelCamundaVersion": { "index": 6, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "int", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The version of a deployed process", "constantName": "org.apache.camel.component.camunda.CamundaConstants#VERSION" }, "CamelCamundaProcessDefinitionKey": { "index": 7, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "long", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The process definition key of a deployed process", "constantName": "org.apache.camel.component.camunda.CamundaConstants#PROCESS_DEFINITION_KEY" } }, + "bodyTypes": { + "consumerOut": { "carriers": [ "pojo" ], "javaType": "org.apache.camel.component.camunda.model.JobWorkerMessage", "byOption": [ { "option": "formatJSON", "value": "true", "carriers": [ "text" ], "javaType": "java.lang.String" } ], "description": "The job of the worker: a JobWorkerMessage with its key, type, custom headers and variables (formatJSON: the same as JSON text). The CamelCamundaJobKey header has the key of the job" }, + "consumerReply": { "carriers": [ "any" ], "description": "When the route ends the job is completed: a Map body gives its entries as the output variables, another body completes it without variables. A route that fails fails the job" }, + "producerIn": { "carriers": [ "pojo", "text", "map", "bytes", "stream", "null" ], "description": "The request of the operation: a request object of org.apache.camel.component.camunda.model, or the same as JSON text with snake_case names. The job operations also take the JobWorkerMessage, or with the CamelCamundaJobKey header a Map of the variables or no body; deployResource takes text, bytes or a stream of the resource with the CamelCamundaResourceName header. JSON as bytes or a stre [...] + "producerOut": { "carriers": [ "pojo" ], "byOption": [ { "option": "formatJSON", "value": "true", "carriers": [ "text" ], "javaType": "java.lang.String" } ], "description": "The response of the operation: a ProcessResponse, MessageResponse, JobResponse or DeploymentResponse, with success false and the error when the call failed (formatJSON: the same as JSON text)" } + }, "properties": { "operationName": { "index": 0, "kind": "path", "displayName": "Operation Name", "group": "common", "label": "common", "required": true, "type": "enum", "javaType": "org.apache.camel.component.camunda.internal.OperationName", "enum": [ "startProcess", "cancelProcess", "publishMessage", "completeJob", "failJob", "updateJobRetries", "worker", "throwError", "deployResource" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The operation t [...] "formatJSON": { "index": 1, "kind": "parameter", "displayName": "Format JSON", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "defaultValue": false, "description": "Format the result in the body as JSON." }, diff --git a/components/camel-camunda/src/main/java/org/apache/camel/component/camunda/CamundaEndpoint.java b/components/camel-camunda/src/main/java/org/apache/camel/component/camunda/CamundaEndpoint.java index a5fd563643e5..5381640ffa17 100644 --- a/components/camel-camunda/src/main/java/org/apache/camel/component/camunda/CamundaEndpoint.java +++ b/components/camel-camunda/src/main/java/org/apache/camel/component/camunda/CamundaEndpoint.java @@ -24,6 +24,9 @@ import org.apache.camel.Processor; import org.apache.camel.Producer; import org.apache.camel.component.camunda.internal.CamundaService; import org.apache.camel.component.camunda.internal.OperationName; +import org.apache.camel.spi.BodyType; +import org.apache.camel.spi.BodyType.Carrier; +import org.apache.camel.spi.BodyTypes; import org.apache.camel.spi.EndpointServiceLocation; import org.apache.camel.spi.Metadata; import org.apache.camel.spi.UriEndpoint; @@ -39,6 +42,33 @@ import org.apache.camel.util.ObjectHelper; syntax = "camunda:operationName", category = { Category.WORKFLOW, Category.SAAS }, headersClass = CamundaConstants.class) +@BodyTypes(consumerOut = @BodyType(value = Carrier.POJO, + javaType = "org.apache.camel.component.camunda.model.JobWorkerMessage", + byOption = @BodyType.When(option = "formatJSON", value = "true", carriers = Carrier.TEXT, + javaType = "java.lang.String"), + description = "The job of the worker: a JobWorkerMessage with its key, type, custom" + + " headers and variables (formatJSON: the same as JSON text). The" + + " CamelCamundaJobKey header has the key of the job"), + consumerReply = @BodyType(value = Carrier.ANY, + description = "When the route ends the job is completed: a Map body gives its entries" + + " as the output variables, another body completes it without" + + " variables. A route that fails fails the job"), + producerIn = @BodyType(value = { + Carrier.POJO, Carrier.TEXT, Carrier.MAP, Carrier.BYTES, Carrier.STREAM, + Carrier.NULL }, + description = "The request of the operation: a request object of" + + " org.apache.camel.component.camunda.model, or the same as JSON text with" + + " snake_case names. The job operations also take the JobWorkerMessage, or" + + " with the CamelCamundaJobKey header a Map of the variables or no body;" + + " deployResource takes text, bytes or a stream of the resource with the" + + " CamelCamundaResourceName header. JSON as bytes or a stream fails: convert" + + " it to text first"), + producerOut = @BodyType(value = Carrier.POJO, + byOption = @BodyType.When(option = "formatJSON", value = "true", carriers = Carrier.TEXT, + javaType = "java.lang.String"), + description = "The response of the operation: a ProcessResponse, MessageResponse," + + " JobResponse or DeploymentResponse, with success false and the error when" + + " the call failed (formatJSON: the same as JSON text)")) public class CamundaEndpoint extends DefaultEndpoint implements EndpointServiceLocation { @UriPath(label = "common", description = "The operation to use", diff --git a/components/camel-debezium/camel-debezium-db2/src/generated/resources/META-INF/org/apache/camel/component/debezium/db2/debezium-db2.json b/components/camel-debezium/camel-debezium-db2/src/generated/resources/META-INF/org/apache/camel/component/debezium/db2/debezium-db2.json index ec46a3c0b968..792f1a8684e7 100644 --- a/components/camel-debezium/camel-debezium-db2/src/generated/resources/META-INF/org/apache/camel/component/debezium/db2/debezium-db2.json +++ b/components/camel-debezium/camel-debezium-db2/src/generated/resources/META-INF/org/apache/camel/component/debezium/db2/debezium-db2.json @@ -132,6 +132,9 @@ "CamelDebeziumBefore": { "index": 5, "kind": "header", "displayName": "", "group": "consumer", "label": "", "required": false, "javaType": "Struct", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "If presents, contains the state of the row before the event occurred.", "constantName": "org.apache.camel.component.debezium.DebeziumConstants#HEADER_BEFORE" }, "CamelDebeziumDdlSQL": { "index": 6, "kind": "header", "displayName": "", "group": "consumer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "If presents, the ddl sql text of the event.", "constantName": "org.apache.camel.component.debezium.DebeziumConstants#HEADER_DDL_SQL" } }, + "bodyTypes": { + "consumerOut": { "carriers": [ "pojo", "null" ], "javaType": "org.apache.kafka.connect.data.Struct", "dependsOn": [ "additionalProperties" ], "description": "The row after the change as a Kafka Connect Struct, which converts to a Map: convert it before a marshal, as its toString is not JSON. No body for a delete, a tombstone or a schema change event; the operation, the key, the row before the change and the DDL are in headers" } + }, "properties": { "name": { "index": 0, "kind": "path", "displayName": "Name", "group": "consumer", "label": "consumer", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.debezium.db2.configuration.Db2ConnectorEmbeddedDebeziumConfiguration", "configurationField": "configuration", "description": "Unique name for the connector. Attempting to register again [...] "additionalProperties": { "index": 1, "kind": "parameter", "displayName": "Additional Properties", "group": "common", "label": "common", "required": false, "type": "object", "javaType": "java.util.Map<java.lang.String, java.lang.Object>", "prefix": "additionalProperties.", "multiValue": true, "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.debezium.db2.configuration.Db2ConnectorEmbeddedDebeziumConfiguration", "configurationF [...] diff --git a/components/camel-debezium/camel-debezium-db2/src/main/java/org/apache/camel/component/debezium/db2/DebeziumDb2Endpoint.java b/components/camel-debezium/camel-debezium-db2/src/main/java/org/apache/camel/component/debezium/db2/DebeziumDb2Endpoint.java index e56586d07633..1b3c33946991 100644 --- a/components/camel-debezium/camel-debezium-db2/src/main/java/org/apache/camel/component/debezium/db2/DebeziumDb2Endpoint.java +++ b/components/camel-debezium/camel-debezium-db2/src/main/java/org/apache/camel/component/debezium/db2/DebeziumDb2Endpoint.java @@ -23,6 +23,9 @@ import org.apache.camel.Category; import org.apache.camel.component.debezium.DebeziumConstants; import org.apache.camel.component.debezium.DebeziumEndpoint; import org.apache.camel.component.debezium.db2.configuration.Db2ConnectorEmbeddedDebeziumConfiguration; +import org.apache.camel.spi.BodyType; +import org.apache.camel.spi.BodyType.Carrier; +import org.apache.camel.spi.BodyTypes; import org.apache.camel.spi.EndpointServiceLocation; import org.apache.camel.spi.UriEndpoint; import org.apache.camel.spi.UriParam; @@ -33,6 +36,12 @@ import org.apache.camel.spi.UriParam; @UriEndpoint(firstVersion = "3.17.0", scheme = "debezium-db2", title = "Debezium DB2 Connector", syntax = "debezium-db2:name", category = { Category.DATABASE }, consumerOnly = true, headersClass = DebeziumConstants.class) +@BodyTypes(consumerOut = @BodyType(value = { Carrier.POJO, Carrier.NULL }, javaType = "org.apache.kafka.connect.data.Struct", + dependsOn = "additionalProperties", + description = "The row after the change as a Kafka Connect Struct, which converts to a Map:" + + " convert it before a marshal, as its toString is not JSON. No body for a" + + " delete, a tombstone or a schema change event; the operation, the key, the row" + + " before the change and the DDL are in headers")) public final class DebeziumDb2Endpoint extends DebeziumEndpoint<Db2ConnectorEmbeddedDebeziumConfiguration> implements EndpointServiceLocation { diff --git a/components/camel-debezium/camel-debezium-mongodb/src/generated/resources/META-INF/org/apache/camel/component/debezium/mongodb/debezium-mongodb.json b/components/camel-debezium/camel-debezium-mongodb/src/generated/resources/META-INF/org/apache/camel/component/debezium/mongodb/debezium-mongodb.json index 3b34bdec096a..82dbf9653fd4 100644 --- a/components/camel-debezium/camel-debezium-mongodb/src/generated/resources/META-INF/org/apache/camel/component/debezium/mongodb/debezium-mongodb.json +++ b/components/camel-debezium/camel-debezium-mongodb/src/generated/resources/META-INF/org/apache/camel/component/debezium/mongodb/debezium-mongodb.json @@ -124,6 +124,9 @@ "CamelDebeziumBefore": { "index": 5, "kind": "header", "displayName": "", "group": "consumer", "label": "", "required": false, "javaType": "Struct", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "If presents, contains the state of the row before the event occurred.", "constantName": "org.apache.camel.component.debezium.DebeziumConstants#HEADER_BEFORE" }, "CamelDebeziumDdlSQL": { "index": 6, "kind": "header", "displayName": "", "group": "consumer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "If presents, the ddl sql text of the event.", "constantName": "org.apache.camel.component.debezium.DebeziumConstants#HEADER_DDL_SQL" } }, + "bodyTypes": { + "consumerOut": { "carriers": [ "text", "null" ], "javaType": "java.lang.String", "format": "json", "dependsOn": [ "additionalProperties" ], "description": "The document after the change as a JSON String (MongoDB extended JSON): unmarshal it to work with its fields. No body for a delete or a tombstone, nor for an update when captureMode does not look up the full document or the document is gone by then; the operation and the key are in headers" } + }, "properties": { "name": { "index": 0, "kind": "path", "displayName": "Name", "group": "consumer", "label": "consumer", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.debezium.mongodb.configuration.MongoDbConnectorEmbeddedDebeziumConfiguration", "configurationField": "configuration", "description": "Unique name for the connector. Attempting to registe [...] "additionalProperties": { "index": 1, "kind": "parameter", "displayName": "Additional Properties", "group": "common", "label": "common", "required": false, "type": "object", "javaType": "java.util.Map<java.lang.String, java.lang.Object>", "prefix": "additionalProperties.", "multiValue": true, "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.debezium.mongodb.configuration.MongoDbConnectorEmbeddedDebeziumConfiguration", "config [...] diff --git a/components/camel-debezium/camel-debezium-mongodb/src/main/java/org/apache/camel/component/debezium/mongodb/DebeziumMongodbEndpoint.java b/components/camel-debezium/camel-debezium-mongodb/src/main/java/org/apache/camel/component/debezium/mongodb/DebeziumMongodbEndpoint.java index 585f615e15ab..33107405abff 100644 --- a/components/camel-debezium/camel-debezium-mongodb/src/main/java/org/apache/camel/component/debezium/mongodb/DebeziumMongodbEndpoint.java +++ b/components/camel-debezium/camel-debezium-mongodb/src/main/java/org/apache/camel/component/debezium/mongodb/DebeziumMongodbEndpoint.java @@ -23,6 +23,9 @@ import org.apache.camel.Category; import org.apache.camel.component.debezium.DebeziumConstants; import org.apache.camel.component.debezium.DebeziumEndpoint; import org.apache.camel.component.debezium.mongodb.configuration.MongoDbConnectorEmbeddedDebeziumConfiguration; +import org.apache.camel.spi.BodyType; +import org.apache.camel.spi.BodyType.Carrier; +import org.apache.camel.spi.BodyTypes; import org.apache.camel.spi.EndpointServiceLocation; import org.apache.camel.spi.UriEndpoint; import org.apache.camel.spi.UriParam; @@ -34,6 +37,13 @@ import org.apache.kafka.connect.data.Schema; @UriEndpoint(firstVersion = "3.0.0", scheme = "debezium-mongodb", title = "Debezium MongoDB Connector", syntax = "debezium-mongodb:name", category = { Category.DATABASE }, consumerOnly = true, headersClass = DebeziumConstants.class) +@BodyTypes(consumerOut = @BodyType(value = { Carrier.TEXT, Carrier.NULL }, javaType = "java.lang.String", format = "json", + dependsOn = "additionalProperties", + description = "The document after the change as a JSON String (MongoDB extended JSON):" + + " unmarshal it to work with its fields. No body for a delete or a tombstone," + + " nor for an update when captureMode does not look up the full document or the" + + " document is gone by then;" + + " the operation and the key are in headers")) public final class DebeziumMongodbEndpoint extends DebeziumEndpoint<MongoDbConnectorEmbeddedDebeziumConfiguration> implements EndpointServiceLocation { diff --git a/components/camel-debezium/camel-debezium-mysql/src/generated/resources/META-INF/org/apache/camel/component/debezium/mysql/debezium-mysql.json b/components/camel-debezium/camel-debezium-mysql/src/generated/resources/META-INF/org/apache/camel/component/debezium/mysql/debezium-mysql.json index 6251d3f17d9f..b1fd5d4ade56 100644 --- a/components/camel-debezium/camel-debezium-mysql/src/generated/resources/META-INF/org/apache/camel/component/debezium/mysql/debezium-mysql.json +++ b/components/camel-debezium/camel-debezium-mysql/src/generated/resources/META-INF/org/apache/camel/component/debezium/mysql/debezium-mysql.json @@ -166,6 +166,9 @@ "CamelDebeziumBefore": { "index": 5, "kind": "header", "displayName": "", "group": "consumer", "label": "", "required": false, "javaType": "Struct", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "If presents, contains the state of the row before the event occurred.", "constantName": "org.apache.camel.component.debezium.DebeziumConstants#HEADER_BEFORE" }, "CamelDebeziumDdlSQL": { "index": 6, "kind": "header", "displayName": "", "group": "consumer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "If presents, the ddl sql text of the event.", "constantName": "org.apache.camel.component.debezium.DebeziumConstants#HEADER_DDL_SQL" } }, + "bodyTypes": { + "consumerOut": { "carriers": [ "pojo", "null" ], "javaType": "org.apache.kafka.connect.data.Struct", "dependsOn": [ "additionalProperties" ], "description": "The row after the change as a Kafka Connect Struct, which converts to a Map: convert it before a marshal, as its toString is not JSON. No body for a delete, a tombstone or a schema change event; the operation, the key, the row before the change and the DDL are in headers" } + }, "properties": { "name": { "index": 0, "kind": "path", "displayName": "Name", "group": "consumer", "label": "consumer", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.debezium.mysql.configuration.MySqlConnectorEmbeddedDebeziumConfiguration", "configurationField": "configuration", "description": "Unique name for the connector. Attempting to register ag [...] "additionalProperties": { "index": 1, "kind": "parameter", "displayName": "Additional Properties", "group": "common", "label": "common", "required": false, "type": "object", "javaType": "java.util.Map<java.lang.String, java.lang.Object>", "prefix": "additionalProperties.", "multiValue": true, "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.debezium.mysql.configuration.MySqlConnectorEmbeddedDebeziumConfiguration", "configurat [...] diff --git a/components/camel-debezium/camel-debezium-mysql/src/main/java/org/apache/camel/component/debezium/mysql/DebeziumMySqlEndpoint.java b/components/camel-debezium/camel-debezium-mysql/src/main/java/org/apache/camel/component/debezium/mysql/DebeziumMySqlEndpoint.java index d97501c930f0..f4139f77eaf9 100644 --- a/components/camel-debezium/camel-debezium-mysql/src/main/java/org/apache/camel/component/debezium/mysql/DebeziumMySqlEndpoint.java +++ b/components/camel-debezium/camel-debezium-mysql/src/main/java/org/apache/camel/component/debezium/mysql/DebeziumMySqlEndpoint.java @@ -22,6 +22,9 @@ import org.apache.camel.Category; import org.apache.camel.component.debezium.DebeziumConstants; import org.apache.camel.component.debezium.DebeziumEndpoint; import org.apache.camel.component.debezium.mysql.configuration.MySqlConnectorEmbeddedDebeziumConfiguration; +import org.apache.camel.spi.BodyType; +import org.apache.camel.spi.BodyType.Carrier; +import org.apache.camel.spi.BodyTypes; import org.apache.camel.spi.EndpointServiceLocation; import org.apache.camel.spi.UriEndpoint; import org.apache.camel.spi.UriParam; @@ -32,6 +35,12 @@ import org.apache.camel.spi.UriParam; @UriEndpoint(firstVersion = "3.0.0", scheme = "debezium-mysql", title = "Debezium MySQL Connector", syntax = "debezium-mysql:name", category = { Category.DATABASE }, consumerOnly = true, headersClass = DebeziumConstants.class) +@BodyTypes(consumerOut = @BodyType(value = { Carrier.POJO, Carrier.NULL }, javaType = "org.apache.kafka.connect.data.Struct", + dependsOn = "additionalProperties", + description = "The row after the change as a Kafka Connect Struct, which converts to a Map:" + + " convert it before a marshal, as its toString is not JSON. No body for a" + + " delete, a tombstone or a schema change event; the operation, the key, the row" + + " before the change and the DDL are in headers")) public final class DebeziumMySqlEndpoint extends DebeziumEndpoint<MySqlConnectorEmbeddedDebeziumConfiguration> implements EndpointServiceLocation { diff --git a/components/camel-debezium/camel-debezium-oracle/src/generated/resources/META-INF/org/apache/camel/component/debezium/oracle/debezium-oracle.json b/components/camel-debezium/camel-debezium-oracle/src/generated/resources/META-INF/org/apache/camel/component/debezium/oracle/debezium-oracle.json index 137eaed6b6ef..12af9daa1bc3 100644 --- a/components/camel-debezium/camel-debezium-oracle/src/generated/resources/META-INF/org/apache/camel/component/debezium/oracle/debezium-oracle.json +++ b/components/camel-debezium/camel-debezium-oracle/src/generated/resources/META-INF/org/apache/camel/component/debezium/oracle/debezium-oracle.json @@ -193,6 +193,9 @@ "CamelDebeziumBefore": { "index": 5, "kind": "header", "displayName": "", "group": "consumer", "label": "", "required": false, "javaType": "Struct", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "If presents, contains the state of the row before the event occurred.", "constantName": "org.apache.camel.component.debezium.DebeziumConstants#HEADER_BEFORE" }, "CamelDebeziumDdlSQL": { "index": 6, "kind": "header", "displayName": "", "group": "consumer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "If presents, the ddl sql text of the event.", "constantName": "org.apache.camel.component.debezium.DebeziumConstants#HEADER_DDL_SQL" } }, + "bodyTypes": { + "consumerOut": { "carriers": [ "pojo", "null" ], "javaType": "org.apache.kafka.connect.data.Struct", "dependsOn": [ "additionalProperties" ], "description": "The row after the change as a Kafka Connect Struct, which converts to a Map: convert it before a marshal, as its toString is not JSON. No body for a delete, a tombstone or a schema change event; the operation, the key, the row before the change and the DDL are in headers" } + }, "properties": { "name": { "index": 0, "kind": "path", "displayName": "Name", "group": "consumer", "label": "consumer", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.debezium.oracle.configuration.OracleConnectorEmbeddedDebeziumConfiguration", "configurationField": "configuration", "description": "Unique name for the connector. Attempting to register [...] "additionalProperties": { "index": 1, "kind": "parameter", "displayName": "Additional Properties", "group": "common", "label": "common", "required": false, "type": "object", "javaType": "java.util.Map<java.lang.String, java.lang.Object>", "prefix": "additionalProperties.", "multiValue": true, "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.debezium.oracle.configuration.OracleConnectorEmbeddedDebeziumConfiguration", "configur [...] diff --git a/components/camel-debezium/camel-debezium-oracle/src/main/java/org/apache/camel/component/debezium/oracle/DebeziumOracleEndpoint.java b/components/camel-debezium/camel-debezium-oracle/src/main/java/org/apache/camel/component/debezium/oracle/DebeziumOracleEndpoint.java index 616c4bdb5fd5..08fa2d4be6e5 100644 --- a/components/camel-debezium/camel-debezium-oracle/src/main/java/org/apache/camel/component/debezium/oracle/DebeziumOracleEndpoint.java +++ b/components/camel-debezium/camel-debezium-oracle/src/main/java/org/apache/camel/component/debezium/oracle/DebeziumOracleEndpoint.java @@ -23,6 +23,9 @@ import org.apache.camel.Category; import org.apache.camel.component.debezium.DebeziumConstants; import org.apache.camel.component.debezium.DebeziumEndpoint; import org.apache.camel.component.debezium.oracle.configuration.OracleConnectorEmbeddedDebeziumConfiguration; +import org.apache.camel.spi.BodyType; +import org.apache.camel.spi.BodyType.Carrier; +import org.apache.camel.spi.BodyTypes; import org.apache.camel.spi.EndpointServiceLocation; import org.apache.camel.spi.UriEndpoint; import org.apache.camel.spi.UriParam; @@ -33,6 +36,12 @@ import org.apache.camel.spi.UriParam; @UriEndpoint(firstVersion = "3.17.0", scheme = "debezium-oracle", title = "Debezium Oracle Connector", syntax = "debezium-oracle:name", category = { Category.DATABASE }, consumerOnly = true, headersClass = DebeziumConstants.class) +@BodyTypes(consumerOut = @BodyType(value = { Carrier.POJO, Carrier.NULL }, javaType = "org.apache.kafka.connect.data.Struct", + dependsOn = "additionalProperties", + description = "The row after the change as a Kafka Connect Struct, which converts to a Map:" + + " convert it before a marshal, as its toString is not JSON. No body for a" + + " delete, a tombstone or a schema change event; the operation, the key, the row" + + " before the change and the DDL are in headers")) public final class DebeziumOracleEndpoint extends DebeziumEndpoint<OracleConnectorEmbeddedDebeziumConfiguration> implements EndpointServiceLocation { diff --git a/components/camel-debezium/camel-debezium-postgres/src/generated/resources/META-INF/org/apache/camel/component/debezium/postgres/debezium-postgres.json b/components/camel-debezium/camel-debezium-postgres/src/generated/resources/META-INF/org/apache/camel/component/debezium/postgres/debezium-postgres.json index 2d1b5fbe7fdf..1c5304388479 100644 --- a/components/camel-debezium/camel-debezium-postgres/src/generated/resources/META-INF/org/apache/camel/component/debezium/postgres/debezium-postgres.json +++ b/components/camel-debezium/camel-debezium-postgres/src/generated/resources/META-INF/org/apache/camel/component/debezium/postgres/debezium-postgres.json @@ -167,6 +167,9 @@ "CamelDebeziumBefore": { "index": 5, "kind": "header", "displayName": "", "group": "consumer", "label": "", "required": false, "javaType": "Struct", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "If presents, contains the state of the row before the event occurred.", "constantName": "org.apache.camel.component.debezium.DebeziumConstants#HEADER_BEFORE" }, "CamelDebeziumDdlSQL": { "index": 6, "kind": "header", "displayName": "", "group": "consumer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "If presents, the ddl sql text of the event.", "constantName": "org.apache.camel.component.debezium.DebeziumConstants#HEADER_DDL_SQL" } }, + "bodyTypes": { + "consumerOut": { "carriers": [ "pojo", "null" ], "javaType": "org.apache.kafka.connect.data.Struct", "dependsOn": [ "additionalProperties" ], "description": "The row after the change as a Kafka Connect Struct, which converts to a Map: convert it before a marshal, as its toString is not JSON. No body for a delete or a tombstone; the operation, the key and the row before the change are in headers" } + }, "properties": { "name": { "index": 0, "kind": "path", "displayName": "Name", "group": "consumer", "label": "consumer", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.debezium.postgres.configuration.PostgresConnectorEmbeddedDebeziumConfiguration", "configurationField": "configuration", "description": "Unique name for the connector. Attempting to regis [...] "additionalProperties": { "index": 1, "kind": "parameter", "displayName": "Additional Properties", "group": "common", "label": "common", "required": false, "type": "object", "javaType": "java.util.Map<java.lang.String, java.lang.Object>", "prefix": "additionalProperties.", "multiValue": true, "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.debezium.postgres.configuration.PostgresConnectorEmbeddedDebeziumConfiguration", "conf [...] diff --git a/components/camel-debezium/camel-debezium-postgres/src/main/java/org/apache/camel/component/debezium/postgres/DebeziumPostgresEndpoint.java b/components/camel-debezium/camel-debezium-postgres/src/main/java/org/apache/camel/component/debezium/postgres/DebeziumPostgresEndpoint.java index 1c409316d1f6..73137386f5a9 100644 --- a/components/camel-debezium/camel-debezium-postgres/src/main/java/org/apache/camel/component/debezium/postgres/DebeziumPostgresEndpoint.java +++ b/components/camel-debezium/camel-debezium-postgres/src/main/java/org/apache/camel/component/debezium/postgres/DebeziumPostgresEndpoint.java @@ -22,6 +22,9 @@ import org.apache.camel.Category; import org.apache.camel.component.debezium.DebeziumConstants; import org.apache.camel.component.debezium.DebeziumEndpoint; import org.apache.camel.component.debezium.postgres.configuration.PostgresConnectorEmbeddedDebeziumConfiguration; +import org.apache.camel.spi.BodyType; +import org.apache.camel.spi.BodyType.Carrier; +import org.apache.camel.spi.BodyTypes; import org.apache.camel.spi.EndpointServiceLocation; import org.apache.camel.spi.UriEndpoint; import org.apache.camel.spi.UriParam; @@ -32,6 +35,12 @@ import org.apache.camel.spi.UriParam; @UriEndpoint(firstVersion = "3.0.0", scheme = "debezium-postgres", title = "Debezium PostgreSQL Connector", syntax = "debezium-postgres:name", category = { Category.DATABASE }, consumerOnly = true, headersClass = DebeziumConstants.class) +@BodyTypes(consumerOut = @BodyType(value = { Carrier.POJO, Carrier.NULL }, javaType = "org.apache.kafka.connect.data.Struct", + dependsOn = "additionalProperties", + description = "The row after the change as a Kafka Connect Struct, which converts to a Map:" + + " convert it before a marshal, as its toString is not JSON. No body for a" + + " delete or a tombstone; the operation, the key and the row before the change" + + " are in headers")) public final class DebeziumPostgresEndpoint extends DebeziumEndpoint<PostgresConnectorEmbeddedDebeziumConfiguration> implements EndpointServiceLocation { diff --git a/components/camel-debezium/camel-debezium-sqlserver/src/generated/resources/META-INF/org/apache/camel/component/debezium/sqlserver/debezium-sqlserver.json b/components/camel-debezium/camel-debezium-sqlserver/src/generated/resources/META-INF/org/apache/camel/component/debezium/sqlserver/debezium-sqlserver.json index b39e8aa153e9..2f933ee0be4d 100644 --- a/components/camel-debezium/camel-debezium-sqlserver/src/generated/resources/META-INF/org/apache/camel/component/debezium/sqlserver/debezium-sqlserver.json +++ b/components/camel-debezium/camel-debezium-sqlserver/src/generated/resources/META-INF/org/apache/camel/component/debezium/sqlserver/debezium-sqlserver.json @@ -140,6 +140,9 @@ "CamelDebeziumBefore": { "index": 5, "kind": "header", "displayName": "", "group": "consumer", "label": "", "required": false, "javaType": "Struct", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "If presents, contains the state of the row before the event occurred.", "constantName": "org.apache.camel.component.debezium.DebeziumConstants#HEADER_BEFORE" }, "CamelDebeziumDdlSQL": { "index": 6, "kind": "header", "displayName": "", "group": "consumer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "If presents, the ddl sql text of the event.", "constantName": "org.apache.camel.component.debezium.DebeziumConstants#HEADER_DDL_SQL" } }, + "bodyTypes": { + "consumerOut": { "carriers": [ "pojo", "null" ], "javaType": "org.apache.kafka.connect.data.Struct", "dependsOn": [ "additionalProperties" ], "description": "The row after the change as a Kafka Connect Struct, which converts to a Map: convert it before a marshal, as its toString is not JSON. No body for a delete, a tombstone or a schema change event; the operation, the key, the row before the change and the DDL are in headers" } + }, "properties": { "name": { "index": 0, "kind": "path", "displayName": "Name", "group": "consumer", "label": "consumer", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.debezium.sqlserver.configuration.SqlServerConnectorEmbeddedDebeziumConfiguration", "configurationField": "configuration", "description": "Unique name for the connector. Attempting to reg [...] "additionalProperties": { "index": 1, "kind": "parameter", "displayName": "Additional Properties", "group": "common", "label": "common", "required": false, "type": "object", "javaType": "java.util.Map<java.lang.String, java.lang.Object>", "prefix": "additionalProperties.", "multiValue": true, "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.debezium.sqlserver.configuration.SqlServerConnectorEmbeddedDebeziumConfiguration", "co [...] diff --git a/components/camel-debezium/camel-debezium-sqlserver/src/main/java/org/apache/camel/component/debezium/sqlserver/DebeziumSqlserverEndpoint.java b/components/camel-debezium/camel-debezium-sqlserver/src/main/java/org/apache/camel/component/debezium/sqlserver/DebeziumSqlserverEndpoint.java index f36a23e8c465..04883e5e04c4 100644 --- a/components/camel-debezium/camel-debezium-sqlserver/src/main/java/org/apache/camel/component/debezium/sqlserver/DebeziumSqlserverEndpoint.java +++ b/components/camel-debezium/camel-debezium-sqlserver/src/main/java/org/apache/camel/component/debezium/sqlserver/DebeziumSqlserverEndpoint.java @@ -22,6 +22,9 @@ import org.apache.camel.Category; import org.apache.camel.component.debezium.DebeziumConstants; import org.apache.camel.component.debezium.DebeziumEndpoint; import org.apache.camel.component.debezium.sqlserver.configuration.SqlServerConnectorEmbeddedDebeziumConfiguration; +import org.apache.camel.spi.BodyType; +import org.apache.camel.spi.BodyType.Carrier; +import org.apache.camel.spi.BodyTypes; import org.apache.camel.spi.EndpointServiceLocation; import org.apache.camel.spi.UriEndpoint; import org.apache.camel.spi.UriParam; @@ -32,6 +35,12 @@ import org.apache.camel.spi.UriParam; @UriEndpoint(firstVersion = "3.0.0", scheme = "debezium-sqlserver", title = "Debezium SQL Server Connector", syntax = "debezium-sqlserver:name", category = { Category.DATABASE }, consumerOnly = true, headersClass = DebeziumConstants.class) +@BodyTypes(consumerOut = @BodyType(value = { Carrier.POJO, Carrier.NULL }, javaType = "org.apache.kafka.connect.data.Struct", + dependsOn = "additionalProperties", + description = "The row after the change as a Kafka Connect Struct, which converts to a Map:" + + " convert it before a marshal, as its toString is not JSON. No body for a" + + " delete, a tombstone or a schema change event; the operation, the key, the row" + + " before the change and the DDL are in headers")) public final class DebeziumSqlserverEndpoint extends DebeziumEndpoint<SqlServerConnectorEmbeddedDebeziumConfiguration> implements EndpointServiceLocation { diff --git a/components/camel-flink/src/generated/resources/META-INF/org/apache/camel/component/flink/flink.json b/components/camel-flink/src/generated/resources/META-INF/org/apache/camel/component/flink/flink.json index 63d685be5682..7ed3d102de8c 100644 --- a/components/camel-flink/src/generated/resources/META-INF/org/apache/camel/component/flink/flink.json +++ b/components/camel-flink/src/generated/resources/META-INF/org/apache/camel/component/flink/flink.json @@ -36,6 +36,10 @@ "CamelFlinkDataStream": { "index": 2, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Object", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The data stream", "constantName": "org.apache.camel.component.flink.FlinkConstants#FLINK_DATASTREAM_HEADER" }, "CamelFlinkDataStreamCallback": { "index": 3, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "org.apache.camel.component.flink.DataStreamCallback", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The data stream callback", "constantName": "org.apache.camel.component.flink.FlinkConstants#FLINK_DATASTREAM_CALLBACK_HEADER" } }, + "bodyTypes": { + "producerIn": { "carriers": [ "any" ], "description": "The body is handed to the DataSet or DataStream callback as its payload, a List as one payload per element; the data to compute on is the DataSet or DataStream of the endpoint or of the CamelFlinkDataSet or CamelFlinkDataStream header" }, + "producerOut": { "carriers": [ "unknown" ], "description": "What the callback returns, null for a void callback. A DataSet it returns is collected into a List; a DataStream it returns fails unless collect is false, then the DataStream (or DataSet) is the body and the CamelFlinkDataStream (or CamelFlinkDataSet) header" } + }, "properties": { "endpointType": { "index": 0, "kind": "path", "displayName": "Endpoint Type", "group": "producer", "label": "", "required": true, "type": "enum", "javaType": "org.apache.camel.component.flink.EndpointType", "enum": [ "dataset", "datastream" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Type of the endpoint (dataset, datastream)." }, "collect": { "index": 1, "kind": "parameter", "displayName": "Collect", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Indicates if results should be collected or counted." }, diff --git a/components/camel-flink/src/main/java/org/apache/camel/component/flink/FlinkEndpoint.java b/components/camel-flink/src/main/java/org/apache/camel/component/flink/FlinkEndpoint.java index 8bffd74cf250..8dfb4bd02d67 100644 --- a/components/camel-flink/src/main/java/org/apache/camel/component/flink/FlinkEndpoint.java +++ b/components/camel-flink/src/main/java/org/apache/camel/component/flink/FlinkEndpoint.java @@ -20,6 +20,9 @@ import org.apache.camel.Category; import org.apache.camel.Consumer; import org.apache.camel.Processor; import org.apache.camel.Producer; +import org.apache.camel.spi.BodyType; +import org.apache.camel.spi.BodyType.Carrier; +import org.apache.camel.spi.BodyTypes; import org.apache.camel.spi.Metadata; import org.apache.camel.spi.UriEndpoint; import org.apache.camel.spi.UriParam; @@ -33,6 +36,16 @@ import org.apache.flink.streaming.api.datastream.DataStream; */ @UriEndpoint(firstVersion = "2.18.0", scheme = "flink", title = "Flink", syntax = "flink:endpointType", producerOnly = true, category = { Category.TRANSFORMATION, Category.BIGDATA }, headersClass = FlinkConstants.class) +@BodyTypes(producerIn = @BodyType(value = Carrier.ANY, + description = "The body is handed to the DataSet or DataStream callback as its payload, a List" + + " as one payload per element; the data to compute on is the DataSet or" + + " DataStream of the endpoint or of the CamelFlinkDataSet or CamelFlinkDataStream" + + " header"), + producerOut = @BodyType(value = Carrier.UNKNOWN, + description = "What the callback returns, null for a void callback. A DataSet it returns is" + + " collected into a List; a DataStream it returns fails unless collect is false," + + " then the DataStream (or DataSet) is the body and the CamelFlinkDataStream (or" + + " CamelFlinkDataSet) header")) public class FlinkEndpoint extends DefaultEndpoint { @UriPath diff --git a/components/camel-flowable/src/generated/resources/META-INF/org/apache/camel/component/flowable/flowable.json b/components/camel-flowable/src/generated/resources/META-INF/org/apache/camel/component/flowable/flowable.json index 90399a04340b..5ee9c3603f1f 100644 --- a/components/camel-flowable/src/generated/resources/META-INF/org/apache/camel/component/flowable/flowable.json +++ b/components/camel-flowable/src/generated/resources/META-INF/org/apache/camel/component/flowable/flowable.json @@ -28,6 +28,11 @@ "lazyStartProducer": { "index": 1, "kind": "property", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail [...] "autowiredEnabled": { "index": 2, "kind": "property", "displayName": "Autowired Enabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching t [...] }, + "bodyTypes": { + "consumerOut": { "carriers": [ "text" ], "javaType": "java.lang.String", "description": "The event a process or case sends on an outbound channel, as text: JSON or XML, as the serializerType of the channel says" }, + "producerIn": { "carriers": [ "text", "pojo" ], "description": "The event for an inbound channel: JSON or XML text, as the deserializerType of the channel expects, or an object whose toString() is that text, such as a Jackson JsonNode. Bytes, a stream or a Map fail: convert them to text first. The headers go along as the headers of the event" }, + "producerOut": { "carriers": [ "unchanged" ] } + }, "properties": { "channelKey": { "index": 0, "kind": "path", "displayName": "Channel Key", "group": "common", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The channel key" }, "bridgeErrorHandler": { "index": 1, "kind": "parameter", "displayName": "Bridge Error Handler", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions (if possible) occurred while the Camel consumer is trying to pickup incoming [...] diff --git a/components/camel-flowable/src/main/java/org/apache/camel/component/flowable/FlowableEndpoint.java b/components/camel-flowable/src/main/java/org/apache/camel/component/flowable/FlowableEndpoint.java index c7d957e8c318..2d770ba2a704 100644 --- a/components/camel-flowable/src/main/java/org/apache/camel/component/flowable/FlowableEndpoint.java +++ b/components/camel-flowable/src/main/java/org/apache/camel/component/flowable/FlowableEndpoint.java @@ -21,6 +21,9 @@ import org.apache.camel.Consumer; import org.apache.camel.Exchange; import org.apache.camel.Processor; import org.apache.camel.Producer; +import org.apache.camel.spi.BodyType; +import org.apache.camel.spi.BodyType.Carrier; +import org.apache.camel.spi.BodyTypes; import org.apache.camel.spi.Metadata; import org.apache.camel.spi.UriEndpoint; import org.apache.camel.spi.UriPath; @@ -35,6 +38,15 @@ import org.flowable.eventregistry.model.CamelOutboundChannelModel; */ @UriEndpoint(firstVersion = "4.9.0", scheme = "flowable", title = "Flowable", syntax = "flowable:channelKey", category = { Category.WORKFLOW }) +@BodyTypes(consumerOut = @BodyType(value = Carrier.TEXT, javaType = "java.lang.String", + description = "The event a process or case sends on an outbound channel, as text: JSON" + + " or XML, as the serializerType of the channel says"), + producerIn = @BodyType(value = { Carrier.TEXT, Carrier.POJO }, + description = "The event for an inbound channel: JSON or XML text, as the deserializerType" + + " of the channel expects, or an object whose toString() is that text, such" + + " as a Jackson JsonNode. Bytes, a stream or a Map fail: convert them to" + + " text first. The headers go along as the headers of the event"), + producerOut = @BodyType(Carrier.UNCHANGED)) public class FlowableEndpoint extends DefaultEndpoint { private EventRegistryEngineConfiguration eventRegistryEngineConfiguration; diff --git a/components/camel-optaplanner/src/generated/resources/META-INF/org/apache/camel/component/optaplanner/optaplanner.json b/components/camel-optaplanner/src/generated/resources/META-INF/org/apache/camel/component/optaplanner/optaplanner.json index a8a30b81c52d..262598ea1771 100644 --- a/components/camel-optaplanner/src/generated/resources/META-INF/org/apache/camel/component/optaplanner/optaplanner.json +++ b/components/camel-optaplanner/src/generated/resources/META-INF/org/apache/camel/component/optaplanner/optaplanner.json @@ -35,6 +35,11 @@ "CamelOptaPlannerIsSolving": { "index": 3, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "Boolean", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Is solving.", "constantName": "org.apache.camel.component.optaplanner.OptaPlannerConstants#IS_SOLVING" }, "CamelOptaPlannerSolverManager": { "index": 4, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "org.optaplanner.core.api.solver.SolverManager", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Solver Manager.", "constantName": "org.apache.camel.component.optaplanner.OptaPlannerConstants#SOLVER_MANAGER" } }, + "bodyTypes": { + "consumerOut": { "carriers": [ "null" ], "description": "The body is empty: the new best solution is in the CamelOptaPlannerBestSolution header. Events come only from producers that solve asynchronously, with the same problemId" }, + "producerIn": { "carriers": [ "pojo" ], "description": "The planning problem: an instance of the PlanningSolution class of the solver configuration, or a ProblemChange to apply to the problem being solved. Any other body fails to solve, and no body fails" }, + "producerOut": { "carriers": [ "pojo", "unchanged" ], "description": "The best solution found, a new instance of the problem class, with the CamelOptaPlannerIsSolving header false (also with async, the exchange waits for it); a ProblemChange leaves the body unchanged" } + }, "properties": { "problemName": { "index": 0, "kind": "path", "displayName": "Problem Name", "group": "common", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.optaplanner.OptaPlannerConfiguration", "configurationField": "configuration", "description": "Problem name" }, "configFile": { "index": 1, "kind": "parameter", "displayName": "Config File", "group": "common", "label": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.optaplanner.OptaPlannerConfiguration", "configurationField": "configuration", "description": "If SolverManager is absent from the header OptaPlannerConstants.SOLVER_MANAGER then a SolverManager [...] diff --git a/components/camel-optaplanner/src/main/docs/optaplanner-component.adoc b/components/camel-optaplanner/src/main/docs/optaplanner-component.adoc index e6045365d74a..9e16f6d14e52 100644 --- a/components/camel-optaplanner/src/main/docs/optaplanner-component.adoc +++ b/components/camel-optaplanner/src/main/docs/optaplanner-component.adoc @@ -49,15 +49,19 @@ include::partial$component-endpoint-headers.adoc[] == Message Body -Camel takes the planning problem for the `IN` body, solves it and returns -it on the _OUT_ body. The `IN` body object supports the following use cases: - -* If the body contains the `PlanningSolution` annotation, then it will be solved using the -solver identified by solverId and either synchronously or asynchronously. -* If the body is an instance of `ProblemChange`, then it will trigger -`addProblemFactChange`. -* If the body is none of the above types, then the producer will return -the best result from the solver identified by `solverId`. +Camel takes the planning problem from the message body, solves it and sets +the best solution as the message body. The body supports the following use cases: + +* If the body is an instance of the `PlanningSolution` class of the solver configuration, then it +is solved, either synchronously or asynchronously. In both cases the exchange continues +with the best solution as the body. +* If the body is an instance of `ProblemChange`, then it is added to the problem being solved +with the same `problemId`, and the body is left unchanged. +* Any other body fails the exchange, as the solver cannot solve it. + +The consumer receives an exchange each time a producer solving asynchronously, with the same +`problemId`, finds a new best solution. Its body is empty: the best solution is in the +`CamelOptaPlannerBestSolution` header. === Examples diff --git a/components/camel-optaplanner/src/main/java/org/apache/camel/component/optaplanner/OptaPlannerEndpoint.java b/components/camel-optaplanner/src/main/java/org/apache/camel/component/optaplanner/OptaPlannerEndpoint.java index bd6937816d09..9d142114c3db 100644 --- a/components/camel-optaplanner/src/main/java/org/apache/camel/component/optaplanner/OptaPlannerEndpoint.java +++ b/components/camel-optaplanner/src/main/java/org/apache/camel/component/optaplanner/OptaPlannerEndpoint.java @@ -26,6 +26,9 @@ import org.apache.camel.Component; import org.apache.camel.Consumer; import org.apache.camel.Processor; import org.apache.camel.Producer; +import org.apache.camel.spi.BodyType; +import org.apache.camel.spi.BodyType.Carrier; +import org.apache.camel.spi.BodyTypes; import org.apache.camel.spi.UriEndpoint; import org.apache.camel.spi.UriParam; import org.apache.camel.support.DefaultEndpoint; @@ -37,6 +40,18 @@ import org.optaplanner.core.api.solver.SolverFactory; */ @UriEndpoint(firstVersion = "2.13.0", scheme = "optaplanner", title = "OptaPlanner", syntax = "optaplanner:problemName", category = { Category.WORKFLOW }, headersClass = OptaPlannerConstants.class) +@BodyTypes(consumerOut = @BodyType(value = Carrier.NULL, + description = "The body is empty: the new best solution is in the CamelOptaPlannerBestSolution" + + " header. Events come only from producers that solve asynchronously, with the" + + " same problemId"), + producerIn = @BodyType(value = Carrier.POJO, + description = "The planning problem: an instance of the PlanningSolution class of the solver" + + " configuration, or a ProblemChange to apply to the problem being solved. Any" + + " other body fails to solve, and no body fails"), + producerOut = @BodyType(value = { Carrier.POJO, Carrier.UNCHANGED }, + description = "The best solution found, a new instance of the problem class, with the" + + " CamelOptaPlannerIsSolving header false (also with async, the exchange waits" + + " for it); a ProblemChange leaves the body unchanged")) public class OptaPlannerEndpoint extends DefaultEndpoint { private static final Map<String, Solver<Object>> SOLVERS = new ConcurrentHashMap<>(); private static final Map<Long, Set<OptaplannerSolutionEventListener>> SOLUTION_LISTENER = new ConcurrentHashMap<>(); diff --git a/components/camel-spring-parent/camel-spring-batch/src/generated/resources/META-INF/org/apache/camel/component/spring/batch/spring-batch.json b/components/camel-spring-parent/camel-spring-batch/src/generated/resources/META-INF/org/apache/camel/component/spring/batch/spring-batch.json index a1cb0dd49a62..d1c8fbc4e8e9 100644 --- a/components/camel-spring-parent/camel-spring-batch/src/generated/resources/META-INF/org/apache/camel/component/spring/batch/spring-batch.json +++ b/components/camel-spring-parent/camel-spring-batch/src/generated/resources/META-INF/org/apache/camel/component/spring/batch/spring-batch.json @@ -32,6 +32,10 @@ "headers": { "CamelSpringBatchJobName": { "index": 0, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The name of the Batch Job to use", "constantName": "org.apache.camel.component.spring.batch.SpringBatchConstants#JOB_NAME" } }, + "bodyTypes": { + "producerIn": { "carriers": [ "any" ], "description": "The body is not read: the job parameters are the message headers (Date, Long and Double values as such, other values as text; a null header value fails)" }, + "producerOut": { "carriers": [ "pojo" ], "javaType": "org.springframework.batch.core.job.JobExecution", "description": "The JobExecution of the launched job, with its status and exit status; the headers stay as they were" } + }, "properties": { "jobName": { "index": 0, "kind": "path", "displayName": "Job Name", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The name of the Spring Batch job located in the registry." }, "jobFromHeader": { "index": 1, "kind": "parameter", "displayName": "Job From Header", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Explicitly defines if the jobName should be taken from the headers instead of the URI." }, diff --git a/components/camel-spring-parent/camel-spring-batch/src/main/java/org/apache/camel/component/spring/batch/SpringBatchEndpoint.java b/components/camel-spring-parent/camel-spring-batch/src/main/java/org/apache/camel/component/spring/batch/SpringBatchEndpoint.java index cd1cf68ed73e..f8ce01d07243 100644 --- a/components/camel-spring-parent/camel-spring-batch/src/main/java/org/apache/camel/component/spring/batch/SpringBatchEndpoint.java +++ b/components/camel-spring-parent/camel-spring-batch/src/main/java/org/apache/camel/component/spring/batch/SpringBatchEndpoint.java @@ -21,6 +21,9 @@ import org.apache.camel.Component; import org.apache.camel.Consumer; import org.apache.camel.Processor; import org.apache.camel.Producer; +import org.apache.camel.spi.BodyType; +import org.apache.camel.spi.BodyType.Carrier; +import org.apache.camel.spi.BodyTypes; import org.apache.camel.spi.Metadata; import org.apache.camel.spi.UriEndpoint; import org.apache.camel.spi.UriParam; @@ -36,6 +39,12 @@ import org.springframework.batch.core.launch.JobLauncher; */ @UriEndpoint(firstVersion = "2.10.0", scheme = "spring-batch", title = "Spring Batch", syntax = "spring-batch:jobName", remote = false, producerOnly = true, headersClass = SpringBatchConstants.class, category = { Category.WORKFLOW }) +@BodyTypes(producerIn = @BodyType(value = Carrier.ANY, + description = "The body is not read: the job parameters are the message headers (Date, Long and" + + " Double values as such, other values as text; a null header value fails)"), + producerOut = @BodyType(value = Carrier.POJO, javaType = "org.springframework.batch.core.job.JobExecution", + description = "The JobExecution of the launched job, with its status and exit status; the" + + " headers stay as they were")) public class SpringBatchEndpoint extends DefaultEndpoint { @UriPath
