This is an automated email from the ASF dual-hosted git repository. acosentino pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel.git
commit 479e481738c90eb063d93e7efc33888e209f04b7 Author: Claus Ibsen <claus.ib...@gmail.com> AuthorDate: Thu Aug 26 06:59:25 2021 +0200 Regen --- .../camel/catalog/components/google-pubsub.json | 6 +- .../src/main/docs/google-pubsub-component.adoc | 2 + .../ROOT/pages/debezium-mysql-component.adoc | 4 +- .../ROOT/pages/google-pubsub-component.adoc | 3 + .../modules/ROOT/pages/hwcloud-dms-component.adoc | 64 ++++++++++++++++++++++ 5 files changed, 76 insertions(+), 3 deletions(-) diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/google-pubsub.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/google-pubsub.json index 184efd4..9578fe4 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/google-pubsub.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/google-pubsub.json @@ -22,8 +22,9 @@ "lenientProperties": false }, "componentProperties": { + "authenticate": { "kind": "property", "displayName": "Authenticate", "group": "common", "label": "common", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Use Credentials when interacting with PubSub service (no authentication is required when using emulator)." }, "endpoint": { "kind": "property", "displayName": "Endpoint", "group": "common", "label": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Endpoint to use with local Pub\/Sub emulator." }, - "serviceAccountKey": { "kind": "property", "displayName": "Service Account Key", "group": "common", "label": "common", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The Service account key that can be used as credentials for the PubSub publisher\/subscriber. It can be loaded by default from classpath, but you can prefix with classpath:, file:, or http: to load the resource from different s [...] + "serviceAccountKey": { "kind": "property", "displayName": "Service Account Key", "group": "common", "label": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The Service account key that can be used as credentials for the PubSub publisher\/subscriber. It can be loaded by default from classpath, but you can prefix with classpath:, file:, or http: to load the resource from different [...] "bridgeErrorHandler": { "kind": "property", "displayName": "Bridge Error Handler", "group": "consumer", "label": "consumer", "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 occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a me [...] "lazyStartProducer": { "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 during star [...] "publisherCacheSize": { "kind": "property", "displayName": "Publisher Cache Size", "group": "producer", "label": "producer", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "description": "Maximum number of producers to cache. This could be increased if you have producers for lots of different topics." }, @@ -35,10 +36,11 @@ "projectId": { "kind": "path", "displayName": "Project Id", "group": "common", "label": "common", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Google Cloud PubSub Project Id" }, "destinationName": { "kind": "path", "displayName": "Destination Name", "group": "common", "label": "common", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Destination Name. For the consumer this will be the subscription name, while for the producer this will be the topic name." }, "ackMode": { "kind": "parameter", "displayName": "Ack Mode", "group": "common", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.component.google.pubsub.GooglePubsubConstants.AckMode", "enum": [ "AUTO", "NONE" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "AUTO", "description": "AUTO = exchange gets ack'ed\/nack'ed on completion. NONE = downstream process has to ack\/nack explicitly" }, + "authenticate": { "kind": "parameter", "displayName": "Authenticate", "group": "common", "label": "common", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Use Credentials when interacting with PubSub service (no authentication is required when using emulator)." }, "concurrentConsumers": { "kind": "parameter", "displayName": "Concurrent Consumers", "group": "common", "label": "", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "1", "description": "The number of parallel streams consuming from the subscription" }, "loggerId": { "kind": "parameter", "displayName": "Logger Id", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Logger ID to use when a match to the parent route required" }, "maxMessagesPerPoll": { "kind": "parameter", "displayName": "Max Messages Per Poll", "group": "common", "label": "", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "1", "description": "The max number of messages to receive from the server in a single API call" }, - "serviceAccountKey": { "kind": "parameter", "displayName": "Service Account Key", "group": "common", "label": "common", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Service account key that can be used as credentials for the PubSub publisher\/subscriber. It can be loaded by default from classpath, but you can prefix with classpath:, file:, or http: to load the r [...] + "serviceAccountKey": { "kind": "parameter", "displayName": "Service Account Key", "group": "common", "label": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The Service account key that can be used as credentials for the PubSub publisher\/subscriber. It can be loaded by default from classpath, but you can prefix with classpath:, file:, or http: to load the resource from different [...] "synchronousPull": { "kind": "parameter", "displayName": "Synchronous Pull", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Synchronously pull batches of messages" }, "bridgeErrorHandler": { "kind": "parameter", "displayName": "Bridge Error Handler", "group": "consumer", "label": "consumer", "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 occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a m [...] "exceptionHandler": { "kind": "parameter", "displayName": "Exception Handler", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "object", "javaType": "org.apache.camel.spi.ExceptionHandler", "optionalPrefix": "consumer.", "deprecated": false, "autowired": false, "secret": false, "description": "To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this option is not in use. By default the con [...] diff --git a/components/camel-google/camel-google-pubsub/src/main/docs/google-pubsub-component.adoc b/components/camel-google/camel-google-pubsub/src/main/docs/google-pubsub-component.adoc index 34539a7..3dd9fec 100644 --- a/components/camel-google/camel-google-pubsub/src/main/docs/google-pubsub-component.adoc +++ b/components/camel-google/camel-google-pubsub/src/main/docs/google-pubsub-component.adoc @@ -80,9 +80,11 @@ The following two sections lists all the options, firstly for the component foll // component options: START == Component Options + The Google Pubsub component supports 9 options, which are listed below. + [width="100%",cols="2,5,^1,2",options="header"] |=== | Name | Description | Default | Type diff --git a/docs/components/modules/ROOT/pages/debezium-mysql-component.adoc b/docs/components/modules/ROOT/pages/debezium-mysql-component.adoc index cba5401..127c0d0 100644 --- a/docs/components/modules/ROOT/pages/debezium-mysql-component.adoc +++ b/docs/components/modules/ROOT/pages/debezium-mysql-component.adoc @@ -334,7 +334,8 @@ The following headers are available when consuming change events from Debezium. | DebeziumConstants.HEADER_SOURCE_METADATA | "CamelDebeziumSourceMetadata" | Map | The metadata about the source event, for example `table` name, database `name`, log position, etc, please refer to the Debezium documentation for more info. | DebeziumConstants.HEADER_OPERATION | "CamelDebeziumOperation" | String | If presents, the type of event operation. Values for the connector are `c` for create (or insert), `u` for update, `d` for delete or `r` in case of a snapshot event. | DebeziumConstants.HEADER_TIMESTAMP | "CamelDebeziumTimestamp" | Long | If presents, the time (using the system clock in the JVM) at which the connector processed the event. -| DebeziumConstants.HEADER_BEFORE | "CamelDebeziumBefore" | Struct | If presents, contains the state of the row before the event occurred. +| DebeziumConstants.HEADER_BEFORE | "CamelDebeziumBefore" | Struct | If presents, contains the state of the row before the event occurred. +| DebeziumConstants.HEADER_DDL_SQL | "CamelDebeziumDdlSQL" | String | If presents, the ddl sql text of the event. |=== == Message body @@ -355,6 +356,7 @@ from("debezium-mysql:dbz-test-1?offsetStorageFileName=/usr/offset-file-1.dat&dat .log(" on this database '${headers.CamelDebeziumSourceMetadata[db]}' and this table '${headers.CamelDebeziumSourceMetadata[table]}'") .log(" with the key ${headers.CamelDebeziumKey}") .log(" the previous value is ${headers.CamelDebeziumBefore}") + .log(" the ddl sql text is ${headers.CamelDebeziumDdlSQL}") ---- By default, the component will emit the events in the body and `CamelDebeziumBefore` header as https://kafka.apache.org/22/javadoc/org/apache/kafka/connect/data/Struct.html[`Struct`] data type, the reasoning behind this, is to perceive the schema information in case is needed. diff --git a/docs/components/modules/ROOT/pages/google-pubsub-component.adoc b/docs/components/modules/ROOT/pages/google-pubsub-component.adoc index 2923251..9d77e69 100644 --- a/docs/components/modules/ROOT/pages/google-pubsub-component.adoc +++ b/docs/components/modules/ROOT/pages/google-pubsub-component.adoc @@ -82,8 +82,11 @@ The following two sections lists all the options, firstly for the component foll // component options: START == Component Options + The Google Pubsub component supports 9 options, which are listed below. + + [width="100%",cols="2,5,^1,2",options="header"] |=== | Name | Description | Default | Type diff --git a/docs/components/modules/ROOT/pages/hwcloud-dms-component.adoc b/docs/components/modules/ROOT/pages/hwcloud-dms-component.adoc index d3545d1..6d0cf35 100644 --- a/docs/components/modules/ROOT/pages/hwcloud-dms-component.adoc +++ b/docs/components/modules/ROOT/pages/hwcloud-dms-component.adoc @@ -162,6 +162,36 @@ with the following path and query parameters: |`CamelHwCloudDmsInstanceId` |`String` | Instance ID to invoke operation on +|`CamelHwCloudDmsName` |`String` | The name of the instance for creating and updating an instance + +|`CamelHwCloudDmsEngineVersion` |`String` | The version of the message engine + +|`CamelHwCloudDmsSpecification` |`String` | The baseline bandwidth of a Kafka instance + +|`CamelHwCloudDmsStorageSpace` |`int` | The message storage space + +|`CamelHwCloudDmsPartitionNum` |`int` | The maximum number of partitions in a Kafka instance + +|`CamelHwCloudDmsAccessUser` |`String` | The username of a RabbitMQ instance + +|`CamelHwCloudDmsPassword` |`String` | The password of a RabbitMQ instance + +|`CamelHwCloudDmsVpcId` |`String` | The VPC ID + +|`CamelHwCloudDmsSecurityGroupId` |`String` | The security group which the instance belongs to + +|`CamelHwCloudDmsSubnetId` |`String` | The subnet ID + +|`CamelHwCloudDmsAvailableZones` |`List<String>` | The ID of an available zone + +|`CamelHwCloudDmsProductId` |`String` | The product ID + +|`CamelHwCloudDmsKafkaManagerUser` |`String` | The username for logging in to the Kafka Manager + +|`CamelHwCloudDmsKafkaManagerPassword` |`String` | The password for logging in to the Kafka Manager + +|`CamelHwCloudDmsStorageSpecCode` |`String` | The storage I/O specification + |======================================================================= If any of the above properties are set, they will override their corresponding query parameter. @@ -187,6 +217,40 @@ If any of the above properties are set, they will override their corresponding q - queryInstance - updateInstance +=== Create Instance +To create an instance, you can pass the parameters through the endpoint, the exchange properties, and the exchange body as a CreateInstanceRequestBody object or a valid JSON String representation of it. Refer to this for the https://support.huaweicloud.com/en-us/api-kafka/kafka-api-180514002.html[Kafka parameters] and the https://support.huaweicloud.com/en-us/api-rabbitmq/rabbitmq-api-180514002.html[RabbitMQ parameters]. If you choose to pass these parameters through the endpoint or thro [...] + +[source,java] +---- +from("direct:triggerRoute") + .setBody(new CreateInstanceRequestBody().withName("new-instance").withDescription("description").with*) // add remaining options + .to("hwcloud-dms:createInstance?region=cn-north-4&authenticationKey=********&secretKey=********&projectId=*******") +---- + +[source,java] +---- +from("direct:triggerRoute") + .setBody("{\"name\":\"new-instance\",\"description\":\"description\"}") // add remaining options + .to("hwcloud-dms:createInstance?region=cn-north-4&authenticationKey=********&secretKey=********&projectId=*******") +---- + +=== Update Instance +To update an instance, you must pass the parameters through the exchange body as an UpdateInstanceRequestBody or a valid JSON String representation of it. Refer to this for the https://support.huaweicloud.com/en-us/api-kafka/kafka-api-180514004.html[Kafka parameters] and the https://support.huaweicloud.com/en-us/api-rabbitmq/rabbitmq-api-180514004.html[RabbitMQ parameters]. An example of how to do this is shown below: + +[source,java] +---- +from("direct:triggerRoute") + .setBody(new UpdateInstanceRequestBody().withName("new-instance").withDescription("description").with*) // add remaining options + .to("hwcloud-dms:updateInstance?instanceId=******®ion=cn-north-4&authenticationKey=********&secretKey=********&projectId=*******") +---- + +[source,java] +---- +from("direct:triggerRoute") + .setBody("{\"name\":\"new-instance\",\"description\":\"description\"}") // add remaining options + .to("hwcloud-dms:updateInstance?instanceId=******®ion=cn-north-4&authenticationKey=********&secretKey=********&projectId=*******") +---- + == Using ServiceKey Configuration Bean Authentication key and secret keys are required to authenticate against cloud DMS service. You can avoid having them being exposed