This is an automated email from the ASF dual-hosted git repository. valdar pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-kafka-connector.git
commit f03ff05edbd59e0c95dc7e2bf1ae03a61718c0bf Author: Andrea Tarocchi <andrea.taroc...@gmail.com> AuthorDate: Fri Oct 29 15:49:22 2021 +0200 fixed googlepubsub itests. --- .../connectors/camel-hwcloud-dms-sink.json | 213 +++++++++++++++ .../camel-hwcloud-imagerecognition-sink.json | 139 ++++++++++ .../connectors/camel-hwcloud-obs-sink.json | 113 ++++++++ .../connectors/camel-hwcloud-obs-source.json | 293 +++++++++++++++++++++ .../connectors/camel-json-patch-sink.json | 54 ++++ .../google/pubsub/clients/GooglePubEasy.java | 38 +++ .../sink/CamelGooglePubSubPropertyFactory.java | 6 +- .../pubsub/sink/CamelSinkGooglePubSubITCase.java | 9 +- 8 files changed, 862 insertions(+), 3 deletions(-) diff --git a/camel-kafka-connector-catalog/src/generated/resources/connectors/camel-hwcloud-dms-sink.json b/camel-kafka-connector-catalog/src/generated/resources/connectors/camel-hwcloud-dms-sink.json new file mode 100644 index 0000000..c5960bd --- /dev/null +++ b/camel-kafka-connector-catalog/src/generated/resources/connectors/camel-hwcloud-dms-sink.json @@ -0,0 +1,213 @@ +{ + "connector": { + "class": "org.apache.camel.kafkaconnector.hwclouddms.CamelHwclouddmsSinkConnector", + "artifactId": "camel-hwcloud-dms-kafka-connector", + "groupId": "org.apache.camel.kafkaconnector", + "id": "camel-hwcloud-dms-sink", + "type": "sink", + "version": "0.12.0-SNAPSHOT", + "description": "To integrate with a fully managed, high-performance message queuing service on Huawei Cloud" + }, + "properties": { + "camel.sink.path.operation": { + "name": "camel.sink.path.operation", + "description": "Operation to be performed", + "priority": "HIGH", + "required": "true" + }, + "camel.sink.endpoint.accessKey": { + "name": "camel.sink.endpoint.accessKey", + "description": "Access key for the cloud user", + "priority": "HIGH", + "required": "true" + }, + "camel.sink.endpoint.accessUser": { + "name": "camel.sink.endpoint.accessUser", + "description": "The username of a RabbitMQ instance. This option is mandatory when creating a RabbitMQ instance.", + "priority": "MEDIUM", + "required": "false" + }, + "camel.sink.endpoint.availableZones": { + "name": "camel.sink.endpoint.availableZones", + "description": "The ID of an available zone. This option is mandatory when creating an instance and it cannot be an empty array.", + "priority": "MEDIUM", + "required": "false" + }, + "camel.sink.endpoint.endpoint": { + "name": "camel.sink.endpoint.endpoint", + "description": "DMS url. Carries higher precedence than region parameter based client initialization", + "priority": "MEDIUM", + "required": "false" + }, + "camel.sink.endpoint.engine": { + "name": "camel.sink.endpoint.engine", + "description": "The message engine. Either kafka or rabbitmq. If the parameter is not specified, all instances will be queried One of: [kafka] [rabbitmq]", + "priority": "MEDIUM", + "required": "false", + "enum": [ + "kafka", + "rabbitmq" + ] + }, + "camel.sink.endpoint.engineVersion": { + "name": "camel.sink.endpoint.engineVersion", + "description": "The version of the message engine. This option is mandatory when creating an instance.", + "priority": "MEDIUM", + "required": "false" + }, + "camel.sink.endpoint.ignoreSslVerification": { + "name": "camel.sink.endpoint.ignoreSslVerification", + "description": "Ignore SSL verification", + "defaultValue": "false", + "priority": "MEDIUM", + "required": "false" + }, + "camel.sink.endpoint.instanceId": { + "name": "camel.sink.endpoint.instanceId", + "description": "The id of the instance. This option is mandatory when deleting or querying an instance", + "priority": "MEDIUM", + "required": "false" + }, + "camel.sink.endpoint.kafkaManagerPassword": { + "name": "camel.sink.endpoint.kafkaManagerPassword", + "description": "The password for logging in to the Kafka Manager. This option is mandatory when creating a Kafka instance.", + "priority": "MEDIUM", + "required": "false" + }, + "camel.sink.endpoint.kafkaManagerUser": { + "name": "camel.sink.endpoint.kafkaManagerUser", + "description": "The username for logging in to the Kafka Manager. This option is mandatory when creating a Kafka instance.", + "priority": "MEDIUM", + "required": "false" + }, + "camel.sink.endpoint.lazyStartProducer": { + "name": "camel.sink.endpoint.lazyStartProducer", + "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 starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and starting the pr [...] + "defaultValue": "false", + "priority": "MEDIUM", + "required": "false" + }, + "camel.sink.endpoint.name": { + "name": "camel.sink.endpoint.name", + "description": "The name of the instance for creating and updating an instance. This option is mandatory when creating an instance", + "priority": "MEDIUM", + "required": "false" + }, + "camel.sink.endpoint.partitionNum": { + "name": "camel.sink.endpoint.partitionNum", + "description": "The maximum number of partitions in a Kafka instance. This option is mandatory when creating a Kafka instance.", + "priority": "MEDIUM", + "required": "false" + }, + "camel.sink.endpoint.password": { + "name": "camel.sink.endpoint.password", + "description": "The password of a RabbitMQ instance. This option is mandatory when creating a RabbitMQ instance.", + "priority": "MEDIUM", + "required": "false" + }, + "camel.sink.endpoint.productId": { + "name": "camel.sink.endpoint.productId", + "description": "The product ID. This option is mandatory when creating an instance.", + "priority": "MEDIUM", + "required": "false" + }, + "camel.sink.endpoint.projectId": { + "name": "camel.sink.endpoint.projectId", + "description": "Cloud project ID", + "priority": "HIGH", + "required": "true" + }, + "camel.sink.endpoint.proxyHost": { + "name": "camel.sink.endpoint.proxyHost", + "description": "Proxy server ip\/hostname", + "priority": "MEDIUM", + "required": "false" + }, + "camel.sink.endpoint.proxyPassword": { + "name": "camel.sink.endpoint.proxyPassword", + "description": "Proxy authentication password", + "priority": "MEDIUM", + "required": "false" + }, + "camel.sink.endpoint.proxyPort": { + "name": "camel.sink.endpoint.proxyPort", + "description": "Proxy server port", + "priority": "MEDIUM", + "required": "false" + }, + "camel.sink.endpoint.proxyUser": { + "name": "camel.sink.endpoint.proxyUser", + "description": "Proxy authentication user", + "priority": "MEDIUM", + "required": "false" + }, + "camel.sink.endpoint.region": { + "name": "camel.sink.endpoint.region", + "description": "DMS service region", + "priority": "HIGH", + "required": "true" + }, + "camel.sink.endpoint.secretKey": { + "name": "camel.sink.endpoint.secretKey", + "description": "Secret key for the cloud user", + "priority": "HIGH", + "required": "true" + }, + "camel.sink.endpoint.securityGroupId": { + "name": "camel.sink.endpoint.securityGroupId", + "description": "The security group which the instance belongs to. This option is mandatory when creating an instance.", + "priority": "MEDIUM", + "required": "false" + }, + "camel.sink.endpoint.serviceKeys": { + "name": "camel.sink.endpoint.serviceKeys", + "description": "Configuration object for cloud service authentication", + "priority": "MEDIUM", + "required": "false" + }, + "camel.sink.endpoint.specification": { + "name": "camel.sink.endpoint.specification", + "description": "The baseline bandwidth of a Kafka instance. This option is mandatory when creating a Kafka instance.", + "priority": "MEDIUM", + "required": "false" + }, + "camel.sink.endpoint.storageSpace": { + "name": "camel.sink.endpoint.storageSpace", + "description": "The message storage space. This option is mandatory when creating an instance.", + "priority": "MEDIUM", + "required": "false" + }, + "camel.sink.endpoint.storageSpecCode": { + "name": "camel.sink.endpoint.storageSpecCode", + "description": "The storage I\/O specification. This option is mandatory when creating an instance.", + "priority": "MEDIUM", + "required": "false" + }, + "camel.sink.endpoint.subnetId": { + "name": "camel.sink.endpoint.subnetId", + "description": "The subnet ID. This option is mandatory when creating an instance.", + "priority": "MEDIUM", + "required": "false" + }, + "camel.sink.endpoint.vpcId": { + "name": "camel.sink.endpoint.vpcId", + "description": "The VPC ID. This option is mandatory when creating an instance.", + "priority": "MEDIUM", + "required": "false" + }, + "camel.component.hwcloud-dms.lazyStartProducer": { + "name": "camel.component.hwcloud-dms.lazyStartProducer", + "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 starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and starting the pr [...] + "defaultValue": "false", + "priority": "MEDIUM", + "required": "false" + }, + "camel.component.hwcloud-dms.autowiredEnabled": { + "name": "camel.component.hwcloud-dms.autowiredEnabled", + "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 type, which then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc.", + "defaultValue": "true", + "priority": "MEDIUM", + "required": "false" + } + } +} diff --git a/camel-kafka-connector-catalog/src/generated/resources/connectors/camel-hwcloud-imagerecognition-sink.json b/camel-kafka-connector-catalog/src/generated/resources/connectors/camel-hwcloud-imagerecognition-sink.json new file mode 100644 index 0000000..31ced5c --- /dev/null +++ b/camel-kafka-connector-catalog/src/generated/resources/connectors/camel-hwcloud-imagerecognition-sink.json @@ -0,0 +1,139 @@ +{ + "connector": { + "class": "org.apache.camel.kafkaconnector.hwcloudimagerecognition.CamelHwcloudimagerecognitionSinkConnector", + "artifactId": "camel-hwcloud-imagerecognition-kafka-connector", + "groupId": "org.apache.camel.kafkaconnector", + "id": "camel-hwcloud-imagerecognition-sink", + "type": "sink", + "version": "0.12.0-SNAPSHOT", + "description": "To identify objects, scenes, and concepts in images on Huawei Cloud" + }, + "properties": { + "camel.sink.path.operation": { + "name": "camel.sink.path.operation", + "description": "Name of Image Recognition operation to perform, including celebrityRecognition and tagRecognition", + "priority": "HIGH", + "required": "true" + }, + "camel.sink.endpoint.accessKey": { + "name": "camel.sink.endpoint.accessKey", + "description": "Access key for the cloud user", + "priority": "HIGH", + "required": "true" + }, + "camel.sink.endpoint.endpoint": { + "name": "camel.sink.endpoint.endpoint", + "description": "Fully qualified Image Recognition service url. Carries higher precedence than region based configuration.", + "priority": "MEDIUM", + "required": "false" + }, + "camel.sink.endpoint.imageContent": { + "name": "camel.sink.endpoint.imageContent", + "description": "Indicates the Base64 character string converted from the image. The size cannot exceed 10 MB. The image resolution of the narrow sides must be greater than 15 pixels, and that of the wide sides cannot exceed 4096 pixels.The supported image formats include JPG, PNG, and BMP. Configure either this parameter or imageUrl, and this one carries higher precedence than imageUrl.", + "priority": "MEDIUM", + "required": "false" + }, + "camel.sink.endpoint.imageUrl": { + "name": "camel.sink.endpoint.imageUrl", + "description": "Indicates the URL of an image. The options are as follows: HTTP\/HTTPS URLs on the public network OBS URLs. To use OBS data, authorization is required, including service authorization, temporary authorization, and anonymous public authorization. For details, see Configuring the Access Permission of OBS. Configure either this parameter or imageContent, and this one carries lower precedence than imageContent.", + "priority": "MEDIUM", + "required": "false" + }, + "camel.sink.endpoint.lazyStartProducer": { + "name": "camel.sink.endpoint.lazyStartProducer", + "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 starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and starting the pr [...] + "defaultValue": "false", + "priority": "MEDIUM", + "required": "false" + }, + "camel.sink.endpoint.projectId": { + "name": "camel.sink.endpoint.projectId", + "description": "Cloud project ID", + "priority": "HIGH", + "required": "true" + }, + "camel.sink.endpoint.proxyHost": { + "name": "camel.sink.endpoint.proxyHost", + "description": "Proxy server ip\/hostname", + "priority": "MEDIUM", + "required": "false" + }, + "camel.sink.endpoint.proxyPassword": { + "name": "camel.sink.endpoint.proxyPassword", + "description": "Proxy authentication password", + "priority": "MEDIUM", + "required": "false" + }, + "camel.sink.endpoint.proxyPort": { + "name": "camel.sink.endpoint.proxyPort", + "description": "Proxy server port", + "priority": "MEDIUM", + "required": "false" + }, + "camel.sink.endpoint.proxyUser": { + "name": "camel.sink.endpoint.proxyUser", + "description": "Proxy authentication user", + "priority": "MEDIUM", + "required": "false" + }, + "camel.sink.endpoint.region": { + "name": "camel.sink.endpoint.region", + "description": "Image Recognition service region. Currently only cn-north-1 and cn-north-4 are supported. This is lower precedence than endpoint based configuration.", + "priority": "HIGH", + "required": "true" + }, + "camel.sink.endpoint.secretKey": { + "name": "camel.sink.endpoint.secretKey", + "description": "Secret key for the cloud user", + "priority": "HIGH", + "required": "true" + }, + "camel.sink.endpoint.serviceKeys": { + "name": "camel.sink.endpoint.serviceKeys", + "description": "Configuration object for cloud service authentication", + "priority": "MEDIUM", + "required": "false" + }, + "camel.sink.endpoint.tagLanguage": { + "name": "camel.sink.endpoint.tagLanguage", + "description": "Indicates the language of the returned tags when the operation is tagRecognition, including zh and en.", + "defaultValue": "\"zh\"", + "priority": "MEDIUM", + "required": "false" + }, + "camel.sink.endpoint.tagLimit": { + "name": "camel.sink.endpoint.tagLimit", + "description": "Indicates the maximum number of the returned tags when the operation is tagRecognition.", + "defaultValue": "50", + "priority": "MEDIUM", + "required": "false" + }, + "camel.sink.endpoint.threshold": { + "name": "camel.sink.endpoint.threshold", + "description": "Indicates the threshold of confidence. When the operation is tagRecognition, this parameter ranges from 0 to 100. Tags whose confidence score is lower than the threshold will not be returned. The default value is 60. When the operation is celebrityRecognition, this parameter ranges from 0 to 1. Labels whose confidence score is lower than the threshold will not be returned. The default value is 0.48.", + "priority": "MEDIUM", + "required": "false" + }, + "camel.sink.endpoint.ignoreSslVerification": { + "name": "camel.sink.endpoint.ignoreSslVerification", + "description": "Ignore SSL verification", + "defaultValue": "false", + "priority": "MEDIUM", + "required": "false" + }, + "camel.component.hwcloud-imagerecognition.lazyStartProducer": { + "name": "camel.component.hwcloud-imagerecognition.lazyStartProducer", + "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 starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and starting the pr [...] + "defaultValue": "false", + "priority": "MEDIUM", + "required": "false" + }, + "camel.component.hwcloud-imagerecognition.autowiredEnabled": { + "name": "camel.component.hwcloud-imagerecognition.autowiredEnabled", + "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 type, which then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc.", + "defaultValue": "true", + "priority": "MEDIUM", + "required": "false" + } + } +} diff --git a/camel-kafka-connector-catalog/src/generated/resources/connectors/camel-hwcloud-obs-sink.json b/camel-kafka-connector-catalog/src/generated/resources/connectors/camel-hwcloud-obs-sink.json new file mode 100644 index 0000000..ec035e3 --- /dev/null +++ b/camel-kafka-connector-catalog/src/generated/resources/connectors/camel-hwcloud-obs-sink.json @@ -0,0 +1,113 @@ +{ + "connector": { + "class": "org.apache.camel.kafkaconnector.hwcloudobs.CamelHwcloudobsSinkConnector", + "artifactId": "camel-hwcloud-obs-kafka-connector", + "groupId": "org.apache.camel.kafkaconnector", + "id": "camel-hwcloud-obs-sink", + "type": "sink", + "version": "0.12.0-SNAPSHOT", + "description": "To provide stable, secure, efficient, and easy-to-use cloud storage service on Huawei Cloud" + }, + "properties": { + "camel.sink.path.operation": { + "name": "camel.sink.path.operation", + "description": "Operation to be performed", + "priority": "HIGH", + "required": "true" + }, + "camel.sink.endpoint.bucketName": { + "name": "camel.sink.endpoint.bucketName", + "description": "Name of bucket to perform operation on", + "priority": "MEDIUM", + "required": "false" + }, + "camel.sink.endpoint.endpoint": { + "name": "camel.sink.endpoint.endpoint", + "description": "OBS url. Carries higher precedence than region parameter based client initialization", + "priority": "MEDIUM", + "required": "false" + }, + "camel.sink.endpoint.region": { + "name": "camel.sink.endpoint.region", + "description": "OBS service region. This is lower precedence than endpoint based configuration", + "priority": "HIGH", + "required": "true" + }, + "camel.sink.endpoint.bucketLocation": { + "name": "camel.sink.endpoint.bucketLocation", + "description": "Location of bucket when creating a new bucket", + "priority": "MEDIUM", + "required": "false" + }, + "camel.sink.endpoint.lazyStartProducer": { + "name": "camel.sink.endpoint.lazyStartProducer", + "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 starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and starting the pr [...] + "defaultValue": "false", + "priority": "MEDIUM", + "required": "false" + }, + "camel.sink.endpoint.proxyHost": { + "name": "camel.sink.endpoint.proxyHost", + "description": "Proxy server ip\/hostname", + "priority": "MEDIUM", + "required": "false" + }, + "camel.sink.endpoint.proxyPassword": { + "name": "camel.sink.endpoint.proxyPassword", + "description": "Proxy authentication password", + "priority": "MEDIUM", + "required": "false" + }, + "camel.sink.endpoint.proxyPort": { + "name": "camel.sink.endpoint.proxyPort", + "description": "Proxy server port", + "priority": "MEDIUM", + "required": "false" + }, + "camel.sink.endpoint.proxyUser": { + "name": "camel.sink.endpoint.proxyUser", + "description": "Proxy authentication user", + "priority": "MEDIUM", + "required": "false" + }, + "camel.sink.endpoint.accessKey": { + "name": "camel.sink.endpoint.accessKey", + "description": "Access key for the cloud user", + "priority": "HIGH", + "required": "true" + }, + "camel.sink.endpoint.ignoreSslVerification": { + "name": "camel.sink.endpoint.ignoreSslVerification", + "description": "Ignore SSL verification", + "defaultValue": "false", + "priority": "MEDIUM", + "required": "false" + }, + "camel.sink.endpoint.secretKey": { + "name": "camel.sink.endpoint.secretKey", + "description": "Secret key for the cloud user", + "priority": "HIGH", + "required": "true" + }, + "camel.sink.endpoint.serviceKeys": { + "name": "camel.sink.endpoint.serviceKeys", + "description": "Configuration object for cloud service authentication", + "priority": "MEDIUM", + "required": "false" + }, + "camel.component.hwcloud-obs.lazyStartProducer": { + "name": "camel.component.hwcloud-obs.lazyStartProducer", + "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 starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and starting the pr [...] + "defaultValue": "false", + "priority": "MEDIUM", + "required": "false" + }, + "camel.component.hwcloud-obs.autowiredEnabled": { + "name": "camel.component.hwcloud-obs.autowiredEnabled", + "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 type, which then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc.", + "defaultValue": "true", + "priority": "MEDIUM", + "required": "false" + } + } +} diff --git a/camel-kafka-connector-catalog/src/generated/resources/connectors/camel-hwcloud-obs-source.json b/camel-kafka-connector-catalog/src/generated/resources/connectors/camel-hwcloud-obs-source.json new file mode 100644 index 0000000..c8340c6 --- /dev/null +++ b/camel-kafka-connector-catalog/src/generated/resources/connectors/camel-hwcloud-obs-source.json @@ -0,0 +1,293 @@ +{ + "connector": { + "class": "org.apache.camel.kafkaconnector.hwcloudobs.CamelHwcloudobsSourceConnector", + "artifactId": "camel-hwcloud-obs-kafka-connector", + "groupId": "org.apache.camel.kafkaconnector", + "id": "camel-hwcloud-obs-source", + "type": "source", + "version": "0.12.0-SNAPSHOT", + "description": "To provide stable, secure, efficient, and easy-to-use cloud storage service on Huawei Cloud" + }, + "properties": { + "camel.source.endpoint.bucketName": { + "name": "camel.source.endpoint.bucketName", + "description": "Name of bucket to perform operation on", + "priority": "MEDIUM", + "required": "false" + }, + "camel.source.endpoint.endpoint": { + "name": "camel.source.endpoint.endpoint", + "description": "OBS url. Carries higher precedence than region parameter based client initialization", + "priority": "MEDIUM", + "required": "false" + }, + "camel.source.endpoint.region": { + "name": "camel.source.endpoint.region", + "description": "OBS service region. This is lower precedence than endpoint based configuration", + "priority": "HIGH", + "required": "true" + }, + "camel.source.endpoint.bridgeErrorHandler": { + "name": "camel.source.endpoint.bridgeErrorHandler", + "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 message and handled by the routing Error Handler. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or ERROR level and ignored.", + "defaultValue": "false", + "priority": "MEDIUM", + "required": "false" + }, + "camel.source.endpoint.deleteAfterRead": { + "name": "camel.source.endpoint.deleteAfterRead", + "description": "Determines if objects should be deleted after it has been retrieved", + "defaultValue": "false", + "priority": "MEDIUM", + "required": "false" + }, + "camel.source.endpoint.delimiter": { + "name": "camel.source.endpoint.delimiter", + "description": "The character used for grouping object names", + "priority": "MEDIUM", + "required": "false" + }, + "camel.source.endpoint.destinationBucket": { + "name": "camel.source.endpoint.destinationBucket", + "description": "Name of destination bucket where objects will be moved when moveAfterRead is set to true", + "priority": "MEDIUM", + "required": "false" + }, + "camel.source.endpoint.fileName": { + "name": "camel.source.endpoint.fileName", + "description": "Get the object from the bucket with the given file name", + "priority": "MEDIUM", + "required": "false" + }, + "camel.source.endpoint.includeFolders": { + "name": "camel.source.endpoint.includeFolders", + "description": "If true, objects in folders will be consumed. Otherwise, they will be ignored and no Exchanges will be created for them", + "defaultValue": "true", + "priority": "MEDIUM", + "required": "false" + }, + "camel.source.endpoint.maxMessagesPerPoll": { + "name": "camel.source.endpoint.maxMessagesPerPoll", + "description": "The maximum number of messages to poll at each polling", + "defaultValue": "10", + "priority": "MEDIUM", + "required": "false" + }, + "camel.source.endpoint.moveAfterRead": { + "name": "camel.source.endpoint.moveAfterRead", + "description": "Determines whether objects should be moved to a different bucket after they have been retrieved. The destinationBucket option must also be set for this option to work.", + "defaultValue": "false", + "priority": "MEDIUM", + "required": "false" + }, + "camel.source.endpoint.prefix": { + "name": "camel.source.endpoint.prefix", + "description": "The object name prefix used for filtering objects to be listed", + "priority": "MEDIUM", + "required": "false" + }, + "camel.source.endpoint.sendEmptyMessageWhenIdle": { + "name": "camel.source.endpoint.sendEmptyMessageWhenIdle", + "description": "If the polling consumer did not poll any files, you can enable this option to send an empty message (no body) instead.", + "defaultValue": "false", + "priority": "MEDIUM", + "required": "false" + }, + "camel.source.endpoint.exceptionHandler": { + "name": "camel.source.endpoint.exceptionHandler", + "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 consumer will deal with exceptions, that will be logged at WARN or ERROR level and ignored.", + "priority": "MEDIUM", + "required": "false" + }, + "camel.source.endpoint.exchangePattern": { + "name": "camel.source.endpoint.exchangePattern", + "description": "Sets the exchange pattern when the consumer creates an exchange. One of: [InOnly] [InOut] [InOptionalOut]", + "priority": "MEDIUM", + "required": "false", + "enum": [ + "InOnly", + "InOut", + "InOptionalOut" + ] + }, + "camel.source.endpoint.pollStrategy": { + "name": "camel.source.endpoint.pollStrategy", + "description": "A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your custom implementation to control error handling usually occurred during the poll operation before an Exchange have been created and being routed in Camel.", + "priority": "MEDIUM", + "required": "false" + }, + "camel.source.endpoint.proxyHost": { + "name": "camel.source.endpoint.proxyHost", + "description": "Proxy server ip\/hostname", + "priority": "MEDIUM", + "required": "false" + }, + "camel.source.endpoint.proxyPassword": { + "name": "camel.source.endpoint.proxyPassword", + "description": "Proxy authentication password", + "priority": "MEDIUM", + "required": "false" + }, + "camel.source.endpoint.proxyPort": { + "name": "camel.source.endpoint.proxyPort", + "description": "Proxy server port", + "priority": "MEDIUM", + "required": "false" + }, + "camel.source.endpoint.proxyUser": { + "name": "camel.source.endpoint.proxyUser", + "description": "Proxy authentication user", + "priority": "MEDIUM", + "required": "false" + }, + "camel.source.endpoint.backoffErrorThreshold": { + "name": "camel.source.endpoint.backoffErrorThreshold", + "description": "The number of subsequent error polls (failed due some error) that should happen before the backoffMultipler should kick-in.", + "priority": "MEDIUM", + "required": "false" + }, + "camel.source.endpoint.backoffIdleThreshold": { + "name": "camel.source.endpoint.backoffIdleThreshold", + "description": "The number of subsequent idle polls that should happen before the backoffMultipler should kick-in.", + "priority": "MEDIUM", + "required": "false" + }, + "camel.source.endpoint.backoffMultiplier": { + "name": "camel.source.endpoint.backoffMultiplier", + "description": "To let the scheduled polling consumer backoff if there has been a number of subsequent idles\/errors in a row. The multiplier is then the number of polls that will be skipped before the next actual attempt is happening again. When this option is in use then backoffIdleThreshold and\/or backoffErrorThreshold must also be configured.", + "priority": "MEDIUM", + "required": "false" + }, + "camel.source.endpoint.delay": { + "name": "camel.source.endpoint.delay", + "description": "Milliseconds before the next poll.", + "defaultValue": "500L", + "priority": "MEDIUM", + "required": "false" + }, + "camel.source.endpoint.greedy": { + "name": "camel.source.endpoint.greedy", + "description": "If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the previous run polled 1 or more messages.", + "defaultValue": "false", + "priority": "MEDIUM", + "required": "false" + }, + "camel.source.endpoint.initialDelay": { + "name": "camel.source.endpoint.initialDelay", + "description": "Milliseconds before the first poll starts.", + "defaultValue": "1000L", + "priority": "MEDIUM", + "required": "false" + }, + "camel.source.endpoint.repeatCount": { + "name": "camel.source.endpoint.repeatCount", + "description": "Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only fire once. If you set it to 5, it will only fire five times. A value of zero or negative means fire forever.", + "defaultValue": "0L", + "priority": "MEDIUM", + "required": "false" + }, + "camel.source.endpoint.runLoggingLevel": { + "name": "camel.source.endpoint.runLoggingLevel", + "description": "The consumer logs a start\/complete log line when it polls. This option allows you to configure the logging level for that. One of: [TRACE] [DEBUG] [INFO] [WARN] [ERROR] [OFF]", + "defaultValue": "\"TRACE\"", + "priority": "MEDIUM", + "required": "false", + "enum": [ + "TRACE", + "DEBUG", + "INFO", + "WARN", + "ERROR", + "OFF" + ] + }, + "camel.source.endpoint.scheduledExecutorService": { + "name": "camel.source.endpoint.scheduledExecutorService", + "description": "Allows for configuring a custom\/shared thread pool to use for the consumer. By default each consumer has its own single threaded thread pool.", + "priority": "MEDIUM", + "required": "false" + }, + "camel.source.endpoint.scheduler": { + "name": "camel.source.endpoint.scheduler", + "description": "To use a cron scheduler from either camel-spring or camel-quartz component. Use value spring or quartz for built in scheduler", + "defaultValue": "\"none\"", + "priority": "MEDIUM", + "required": "false" + }, + "camel.source.endpoint.schedulerProperties": { + "name": "camel.source.endpoint.schedulerProperties", + "description": "To configure additional properties when using a custom scheduler or any of the Quartz, Spring based scheduler.", + "priority": "MEDIUM", + "required": "false" + }, + "camel.source.endpoint.startScheduler": { + "name": "camel.source.endpoint.startScheduler", + "description": "Whether the scheduler should be auto started.", + "defaultValue": "true", + "priority": "MEDIUM", + "required": "false" + }, + "camel.source.endpoint.timeUnit": { + "name": "camel.source.endpoint.timeUnit", + "description": "Time unit for initialDelay and delay options. One of: [NANOSECONDS] [MICROSECONDS] [MILLISECONDS] [SECONDS] [MINUTES] [HOURS] [DAYS]", + "defaultValue": "\"MILLISECONDS\"", + "priority": "MEDIUM", + "required": "false", + "enum": [ + "NANOSECONDS", + "MICROSECONDS", + "MILLISECONDS", + "SECONDS", + "MINUTES", + "HOURS", + "DAYS" + ] + }, + "camel.source.endpoint.useFixedDelay": { + "name": "camel.source.endpoint.useFixedDelay", + "description": "Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details.", + "defaultValue": "true", + "priority": "MEDIUM", + "required": "false" + }, + "camel.source.endpoint.accessKey": { + "name": "camel.source.endpoint.accessKey", + "description": "Access key for the cloud user", + "priority": "HIGH", + "required": "true" + }, + "camel.source.endpoint.ignoreSslVerification": { + "name": "camel.source.endpoint.ignoreSslVerification", + "description": "Ignore SSL verification", + "defaultValue": "false", + "priority": "MEDIUM", + "required": "false" + }, + "camel.source.endpoint.secretKey": { + "name": "camel.source.endpoint.secretKey", + "description": "Secret key for the cloud user", + "priority": "HIGH", + "required": "true" + }, + "camel.source.endpoint.serviceKeys": { + "name": "camel.source.endpoint.serviceKeys", + "description": "Configuration object for cloud service authentication", + "priority": "MEDIUM", + "required": "false" + }, + "camel.component.hwcloud-obs.bridgeErrorHandler": { + "name": "camel.component.hwcloud-obs.bridgeErrorHandler", + "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 message and handled by the routing Error Handler. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or ERROR level and ignored.", + "defaultValue": "false", + "priority": "MEDIUM", + "required": "false" + }, + "camel.component.hwcloud-obs.autowiredEnabled": { + "name": "camel.component.hwcloud-obs.autowiredEnabled", + "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 type, which then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc.", + "defaultValue": "true", + "priority": "MEDIUM", + "required": "false" + } + } +} diff --git a/camel-kafka-connector-catalog/src/generated/resources/connectors/camel-json-patch-sink.json b/camel-kafka-connector-catalog/src/generated/resources/connectors/camel-json-patch-sink.json new file mode 100644 index 0000000..ec2b9db --- /dev/null +++ b/camel-kafka-connector-catalog/src/generated/resources/connectors/camel-json-patch-sink.json @@ -0,0 +1,54 @@ +{ + "connector": { + "class": "org.apache.camel.kafkaconnector.jsonpatch.CamelJsonpatchSinkConnector", + "artifactId": "camel-json-patch-kafka-connector", + "groupId": "org.apache.camel.kafkaconnector", + "id": "camel-json-patch-sink", + "type": "sink", + "version": "0.12.0-SNAPSHOT", + "description": "JsonPatch component which transform JSON using JSON patch (RFC 6902)." + }, + "properties": { + "camel.sink.path.resourceUri": { + "name": "camel.sink.path.resourceUri", + "description": "Path to the resource. You can prefix with: classpath, file, http, ref, or bean. classpath, file and http loads the resource using these protocols (classpath is default). ref will lookup the resource in the registry. bean will call a method on a bean to be used as the resource. For bean you can specify the method name after dot, eg bean:myBean.myMethod.", + "priority": "HIGH", + "required": "true" + }, + "camel.sink.endpoint.allowContextMapAll": { + "name": "camel.sink.endpoint.allowContextMapAll", + "description": "Sets whether the context map should allow access to all details. By default only the message body and headers can be accessed. This option can be enabled for full access to the current Exchange and CamelContext. Doing so impose a potential security risk as this opens access to the full power of CamelContext API.", + "defaultValue": "false", + "priority": "MEDIUM", + "required": "false" + }, + "camel.sink.endpoint.contentCache": { + "name": "camel.sink.endpoint.contentCache", + "description": "Sets whether to use resource content cache or not", + "defaultValue": "false", + "priority": "MEDIUM", + "required": "false" + }, + "camel.sink.endpoint.lazyStartProducer": { + "name": "camel.sink.endpoint.lazyStartProducer", + "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 starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and starting the pr [...] + "defaultValue": "false", + "priority": "MEDIUM", + "required": "false" + }, + "camel.component.json-patch.lazyStartProducer": { + "name": "camel.component.json-patch.lazyStartProducer", + "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 starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and starting the pr [...] + "defaultValue": "false", + "priority": "MEDIUM", + "required": "false" + }, + "camel.component.json-patch.autowiredEnabled": { + "name": "camel.component.json-patch.autowiredEnabled", + "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 type, which then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc.", + "defaultValue": "true", + "priority": "MEDIUM", + "required": "false" + } + } +} diff --git a/tests/itests-google-pubsub/src/test/java/org/apache/camel/kafkaconnector/google/pubsub/clients/GooglePubEasy.java b/tests/itests-google-pubsub/src/test/java/org/apache/camel/kafkaconnector/google/pubsub/clients/GooglePubEasy.java index 02420fe..2931b28 100644 --- a/tests/itests-google-pubsub/src/test/java/org/apache/camel/kafkaconnector/google/pubsub/clients/GooglePubEasy.java +++ b/tests/itests-google-pubsub/src/test/java/org/apache/camel/kafkaconnector/google/pubsub/clients/GooglePubEasy.java @@ -74,6 +74,10 @@ public class GooglePubEasy { doCreateTopic(topicName); } + public void deleteTopic(String topicName) throws IOException, InterruptedException { + doDeleteTopic(topicName); + } + public void createSubscription(String subscriptionName, String topicName) throws IOException { TopicName googleTopic = TopicName.of(project, topicName); @@ -91,6 +95,20 @@ public class GooglePubEasy { } } + public void deleteSubscription(String subscriptionName) throws IOException { + projectSubscriptionName = ProjectSubscriptionName.of(project, subscriptionName); + + SubscriptionAdminSettings adminSettings = SubscriptionAdminSettings + .newBuilder() + .setCredentialsProvider(NoCredentialsProvider.create()) + .setTransportChannelProvider(channelProvider) + .build(); + + try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create(adminSettings)) { + subscriptionAdminClient.deleteSubscription(projectSubscriptionName); + } + } + private void doCreateTopic(String topicName) throws IOException, InterruptedException { TopicName googleTopic = TopicName.of(project, topicName); @@ -111,6 +129,26 @@ public class GooglePubEasy { } } + private void doDeleteTopic(String topicName) throws IOException, InterruptedException { + TopicName googleTopic = TopicName.of(project, topicName); + + TopicAdminSettings topicAdminSettings = TopicAdminSettings + .newBuilder() + .setCredentialsProvider(NoCredentialsProvider.create()) + .setTransportChannelProvider(channelProvider) + .build(); + + try (TopicAdminClient client = TopicAdminClient.create(topicAdminSettings)) { + LOG.info("Deleting topic {} (original {})", googleTopic.toString(), googleTopic.getTopic()); + + client.deleteTopic(googleTopic); + + if (client.awaitTermination(10, TimeUnit.SECONDS)) { + client.shutdownNow(); + } + } + } + public void receive() { try { MessageReceiver receiver = (pubsubMessage, ackReplyConsumer) -> { diff --git a/tests/itests-google-pubsub/src/test/java/org/apache/camel/kafkaconnector/google/pubsub/sink/CamelGooglePubSubPropertyFactory.java b/tests/itests-google-pubsub/src/test/java/org/apache/camel/kafkaconnector/google/pubsub/sink/CamelGooglePubSubPropertyFactory.java index e7a1c01..2b3c847 100644 --- a/tests/itests-google-pubsub/src/test/java/org/apache/camel/kafkaconnector/google/pubsub/sink/CamelGooglePubSubPropertyFactory.java +++ b/tests/itests-google-pubsub/src/test/java/org/apache/camel/kafkaconnector/google/pubsub/sink/CamelGooglePubSubPropertyFactory.java @@ -34,6 +34,9 @@ public class CamelGooglePubSubPropertyFactory extends SinkConnectorPropertyFacto return setProperty("camel.component.google-pubsub.endpoint", value); } + public CamelGooglePubSubPropertyFactory withAuthenticate(boolean authenticationEnabled) { + return setProperty("camel.component.google-pubsub.authenticate", authenticationEnabled); + } public EndpointUrlBuilder<CamelGooglePubSubPropertyFactory> withUrl(String projectId, String destinationName) { String queueUrl = String.format("google-pubsub:%s:%s", projectId, destinationName); @@ -44,11 +47,10 @@ public class CamelGooglePubSubPropertyFactory extends SinkConnectorPropertyFacto public static CamelGooglePubSubPropertyFactory basic() { return new CamelGooglePubSubPropertyFactory() .withTasksMax(1) + .withAuthenticate(false) .withName("CamelGooglePubSub") .withConnectorClass("org.apache.camel.kafkaconnector.googlepubsub.CamelGooglepubsubSinkConnector") .withKeyConverterClass("org.apache.kafka.connect.storage.StringConverter") .withValueConverterClass("org.apache.kafka.connect.storage.StringConverter"); - } - } diff --git a/tests/itests-google-pubsub/src/test/java/org/apache/camel/kafkaconnector/google/pubsub/sink/CamelSinkGooglePubSubITCase.java b/tests/itests-google-pubsub/src/test/java/org/apache/camel/kafkaconnector/google/pubsub/sink/CamelSinkGooglePubSubITCase.java index fff41ef..95a7903 100644 --- a/tests/itests-google-pubsub/src/test/java/org/apache/camel/kafkaconnector/google/pubsub/sink/CamelSinkGooglePubSubITCase.java +++ b/tests/itests-google-pubsub/src/test/java/org/apache/camel/kafkaconnector/google/pubsub/sink/CamelSinkGooglePubSubITCase.java @@ -76,7 +76,14 @@ public class CamelSinkGooglePubSubITCase extends CamelSinkTestSupport { @AfterEach public void tearDown() { - easyClient.shutdown(); + try { + easyClient.deleteSubscription(testSubscription); + easyClient.deleteTopic(googlePubSubTopic); + } catch (InterruptedException | IOException e) { + fail(e.getMessage()); + } finally { + easyClient.shutdown(); + } } @Override