You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2020/02/28 15:31:33 UTC
[camel] branch master updated (3f4c065 -> f2ec241)
This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git.
from 3f4c065 CAMEL-14568 - Fixed AWS KMS
new 5f49712 CAMEL-14568 - Fixed AWS MQ
new 27fe3f0 CAMEL-14568 - Fixed AWS MSK
new f2ec241 CAMEL-14568 - Fixed AWS S3
The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../component/aws/mq/MQComponentConfigurer.java | 7 +-
.../org/apache/camel/component/aws/mq/aws-mq.json | 8 +--
.../src/main/docs/aws-mq-component.adoc | 2 +-
.../apache/camel/component/aws/mq/MQComponent.java | 48 +-------------
.../aws/mq/MQComponentConfigurationTest.java | 16 ++---
.../component/aws/msk/MSKComponentConfigurer.java | 7 +-
.../apache/camel/component/aws/msk/aws-msk.json | 8 +--
.../src/main/docs/aws-msk-component.adoc | 2 +-
.../camel/component/aws/msk/MSKComponent.java | 48 +-------------
.../aws/msk/MSKComponentConfigurationTest.java | 16 ++---
.../component/aws/s3/S3ComponentConfigurer.java | 11 ++--
.../org/apache/camel/component/aws/s3/aws-s3.json | 8 +--
.../src/main/docs/aws-s3-component.adoc | 6 +-
.../apache/camel/component/aws/s3/S3Component.java | 47 +------------
.../aws/s3/S3ComponentConfigurationTest.java | 10 +--
.../dsl/AwsMqComponentBuilderFactory.java | 32 ++++-----
.../dsl/AwsMskComponentBuilderFactory.java | 34 +++++-----
.../dsl/AwsS3ComponentBuilderFactory.java | 76 +++++++++++-----------
18 files changed, 128 insertions(+), 258 deletions(-)
[camel] 03/03: CAMEL-14568 - Fixed AWS S3
Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git
commit f2ec2412867c05daecd026265ccfdaaf74f8a9f1
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Fri Feb 28 16:29:33 2020 +0100
CAMEL-14568 - Fixed AWS S3
---
.../component/aws/s3/S3ComponentConfigurer.java | 11 ++--
.../org/apache/camel/component/aws/s3/aws-s3.json | 8 +--
.../src/main/docs/aws-s3-component.adoc | 6 +-
.../apache/camel/component/aws/s3/S3Component.java | 47 +------------
.../aws/s3/S3ComponentConfigurationTest.java | 10 +--
.../dsl/AwsS3ComponentBuilderFactory.java | 76 +++++++++++-----------
6 files changed, 57 insertions(+), 101 deletions(-)
diff --git a/components/camel-aws-s3/src/generated/java/org/apache/camel/component/aws/s3/S3ComponentConfigurer.java b/components/camel-aws-s3/src/generated/java/org/apache/camel/component/aws/s3/S3ComponentConfigurer.java
index c48eda7..c0e4e6e 100644
--- a/components/camel-aws-s3/src/generated/java/org/apache/camel/component/aws/s3/S3ComponentConfigurer.java
+++ b/components/camel-aws-s3/src/generated/java/org/apache/camel/component/aws/s3/S3ComponentConfigurer.java
@@ -22,12 +22,11 @@ public class S3ComponentConfigurer extends PropertyConfigurerSupport implements
public boolean configure(CamelContext camelContext, Object obj, String name, Object value, boolean ignoreCase) {
S3Component target = (S3Component) obj;
switch (ignoreCase ? name.toLowerCase() : name) {
- case "accesskey":
- case "accessKey": target.setAccessKey(property(camelContext, java.lang.String.class, value)); return true;
case "amazons3client":
case "amazonS3Client": getOrCreateConfiguration(target).setAmazonS3Client(property(camelContext, com.amazonaws.services.s3.AmazonS3.class, value)); return true;
case "autocreatebucket":
case "autoCreateBucket": getOrCreateConfiguration(target).setAutoCreateBucket(property(camelContext, boolean.class, value)); return true;
+ case "configuration": target.setConfiguration(property(camelContext, org.apache.camel.component.aws.s3.S3Configuration.class, value)); return true;
case "pathstyleaccess":
case "pathStyleAccess": getOrCreateConfiguration(target).setPathStyleAccess(property(camelContext, boolean.class, value)); return true;
case "policy": getOrCreateConfiguration(target).setPolicy(property(camelContext, java.lang.String.class, value)); return true;
@@ -37,10 +36,7 @@ public class S3ComponentConfigurer extends PropertyConfigurerSupport implements
case "proxyPort": getOrCreateConfiguration(target).setProxyPort(property(camelContext, java.lang.Integer.class, value)); return true;
case "proxyprotocol":
case "proxyProtocol": getOrCreateConfiguration(target).setProxyProtocol(property(camelContext, com.amazonaws.Protocol.class, value)); return true;
- case "region": target.setRegion(property(camelContext, java.lang.String.class, value)); return true;
case "region": getOrCreateConfiguration(target).setRegion(property(camelContext, java.lang.String.class, value)); return true;
- case "secretkey":
- case "secretKey": target.setSecretKey(property(camelContext, java.lang.String.class, value)); return true;
case "useiamcredentials":
case "useIAMCredentials": getOrCreateConfiguration(target).setUseIAMCredentials(property(camelContext, boolean.class, value)); return true;
case "encryptionmaterials":
@@ -80,7 +76,6 @@ public class S3ComponentConfigurer extends PropertyConfigurerSupport implements
case "useAwsKMS": getOrCreateConfiguration(target).setUseAwsKMS(property(camelContext, boolean.class, value)); return true;
case "basicpropertybinding":
case "basicPropertyBinding": target.setBasicPropertyBinding(property(camelContext, boolean.class, value)); return true;
- case "configuration": target.setConfiguration(property(camelContext, org.apache.camel.component.aws.s3.S3Configuration.class, value)); return true;
case "acceleratemodeenabled":
case "accelerateModeEnabled": getOrCreateConfiguration(target).setAccelerateModeEnabled(property(camelContext, boolean.class, value)); return true;
case "chunkedencodingdisabled":
@@ -91,6 +86,10 @@ public class S3ComponentConfigurer extends PropertyConfigurerSupport implements
case "forceGlobalBucketAccessEnabled": getOrCreateConfiguration(target).setForceGlobalBucketAccessEnabled(property(camelContext, boolean.class, value)); return true;
case "payloadsigningenabled":
case "payloadSigningEnabled": getOrCreateConfiguration(target).setPayloadSigningEnabled(property(camelContext, boolean.class, value)); return true;
+ case "accesskey":
+ case "accessKey": getOrCreateConfiguration(target).setAccessKey(property(camelContext, java.lang.String.class, value)); return true;
+ case "secretkey":
+ case "secretKey": getOrCreateConfiguration(target).setSecretKey(property(camelContext, java.lang.String.class, value)); return true;
default: return false;
}
}
diff --git a/components/camel-aws-s3/src/generated/resources/org/apache/camel/component/aws/s3/aws-s3.json b/components/camel-aws-s3/src/generated/resources/org/apache/camel/component/aws/s3/aws-s3.json
index 4534366..c4932c4 100644
--- a/components/camel-aws-s3/src/generated/resources/org/apache/camel/component/aws/s3/aws-s3.json
+++ b/components/camel-aws-s3/src/generated/resources/org/apache/camel/component/aws/s3/aws-s3.json
@@ -19,16 +19,15 @@
"version": "3.2.0-SNAPSHOT"
},
"componentProperties": {
- "accessKey": { "kind": "property", "displayName": "Access Key", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "description": "Amazon AWS Access Key" },
"amazonS3Client": { "kind": "property", "displayName": "Amazon S3 Client", "group": "common", "label": "", "required": false, "type": "object", "javaType": "com.amazonaws.services.s3.AmazonS3", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws.s3.S3Configuration", "configurationField": "configuration", "description": "Reference to a com.amazonaws.services.s3.AmazonS3 in the registry." },
"autoCreateBucket": { "kind": "property", "displayName": "Auto Create Bucket", "group": "common", "label": "common", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": "true", "configurationClass": "org.apache.camel.component.aws.s3.S3Configuration", "configurationField": "configuration", "description": "Setting the autocreation of the bucket" },
+ "configuration": { "kind": "property", "displayName": "Configuration", "group": "common", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.component.aws.s3.S3Configuration", "deprecated": false, "secret": false, "description": "The component configuration" },
"pathStyleAccess": { "kind": "property", "displayName": "Path Style Access", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws.s3.S3Configuration", "configurationField": "configuration", "description": "Whether or not the S3 client should use path style access" },
"policy": { "kind": "property", "displayName": "Policy", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws.s3.S3Configuration", "configurationField": "configuration", "description": "The policy for this queue to set in the com.amazonaws.services.s3.AmazonS3#setBucketPolicy() method." },
"proxyHost": { "kind": "property", "displayName": "Proxy Host", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws.s3.S3Configuration", "configurationField": "configuration", "description": "To define a proxy host when instantiating the SQS client" },
"proxyPort": { "kind": "property", "displayName": "Proxy Port", "group": "common", "label": "", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws.s3.S3Configuration", "configurationField": "configuration", "description": "Specify a proxy port to be used inside the client definition." },
"proxyProtocol": { "kind": "property", "displayName": "Proxy Protocol", "group": "common", "label": "", "required": false, "type": "object", "javaType": "com.amazonaws.Protocol", "enum": [ "HTTP", "HTTPS" ], "deprecated": false, "secret": false, "defaultValue": "HTTPS", "configurationClass": "org.apache.camel.component.aws.s3.S3Configuration", "configurationField": "configuration", "description": "To define a proxy protocol when instantiating the S3 client" },
"region": { "kind": "property", "displayName": "Region", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws.s3.S3Configuration", "configurationField": "configuration", "description": "The region in which S3 client needs to work. When using this parameter, the configuration will expect the capitalized name of the region (for example AP_EAST_1) Y [...]
- "secretKey": { "kind": "property", "displayName": "Secret Key", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "description": "Amazon AWS Secret Key" },
"useIAMCredentials": { "kind": "property", "displayName": "Use IAMCredentials", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": "false", "configurationClass": "org.apache.camel.component.aws.s3.S3Configuration", "configurationField": "configuration", "description": "Set whether the S3 client should expect to load credentials on an EC2 instance or to expect static credentials to be passe [...]
"encryptionMaterials": { "kind": "property", "displayName": "Encryption Materials", "group": "common (advanced)", "label": "common,advanced", "required": false, "type": "object", "javaType": "com.amazonaws.services.s3.model.EncryptionMaterials", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws.s3.S3Configuration", "configurationField": "configuration", "description": "The encryption materials to use in case of Symmetric\/Asymmetric client usage" },
"useEncryption": { "kind": "property", "displayName": "Use Encryption", "group": "common (advanced)", "label": "common,advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": "false", "configurationClass": "org.apache.camel.component.aws.s3.S3Configuration", "configurationField": "configuration", "description": "Define if encryption must be used or not" },
@@ -50,12 +49,13 @@
"awsKMSKeyId": { "kind": "property", "displayName": "Aws KMSKey Id", "group": "producer (advanced)", "label": "producer,advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws.s3.S3Configuration", "configurationField": "configuration", "description": "Define the id of KMS key to use in case KMS is enabled" },
"useAwsKMS": { "kind": "property", "displayName": "Use Aws KMS", "group": "producer (advanced)", "label": "producer,advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": "false", "configurationClass": "org.apache.camel.component.aws.s3.S3Configuration", "configurationField": "configuration", "description": "Define if KMS must be used or not" },
"basicPropertyBinding": { "kind": "property", "displayName": "Basic Property Binding", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Whether the component should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities" },
- "configuration": { "kind": "property", "displayName": "Configuration", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.camel.component.aws.s3.S3Configuration", "deprecated": false, "secret": false, "description": "The AWS S3 default configuration" },
"accelerateModeEnabled": { "kind": "property", "displayName": "Accelerate Mode Enabled", "group": " advanced", "label": "common, advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": "false", "configurationClass": "org.apache.camel.component.aws.s3.S3Configuration", "configurationField": "configuration", "description": "Define if Accelerate Mode enabled is true or false" },
"chunkedEncodingDisabled": { "kind": "property", "displayName": "Chunked Encoding Disabled", "group": " advanced", "label": "common, advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": "false", "configurationClass": "org.apache.camel.component.aws.s3.S3Configuration", "configurationField": "configuration", "description": "Define if disabled Chunked Encoding is true or false" },
"dualstackEnabled": { "kind": "property", "displayName": "Dualstack Enabled", "group": " advanced", "label": "common, advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": "false", "configurationClass": "org.apache.camel.component.aws.s3.S3Configuration", "configurationField": "configuration", "description": "Define if Dualstack enabled is true or false" },
"forceGlobalBucketAccessEnabled": { "kind": "property", "displayName": "Force Global Bucket Access Enabled", "group": " advanced", "label": "common, advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": "false", "configurationClass": "org.apache.camel.component.aws.s3.S3Configuration", "configurationField": "configuration", "description": "Define if Force Global Bucket Access enabled is true or false" },
- "payloadSigningEnabled": { "kind": "property", "displayName": "Payload Signing Enabled", "group": " advanced", "label": "common, advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": "false", "configurationClass": "org.apache.camel.component.aws.s3.S3Configuration", "configurationField": "configuration", "description": "Define if Payload Signing enabled is true or false" }
+ "payloadSigningEnabled": { "kind": "property", "displayName": "Payload Signing Enabled", "group": " advanced", "label": "common, advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": "false", "configurationClass": "org.apache.camel.component.aws.s3.S3Configuration", "configurationField": "configuration", "description": "Define if Payload Signing enabled is true or false" },
+ "accessKey": { "kind": "property", "displayName": "Access Key", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": true, "configurationClass": "org.apache.camel.component.aws.s3.S3Configuration", "configurationField": "configuration", "description": "Amazon AWS Access Key" },
+ "secretKey": { "kind": "property", "displayName": "Secret Key", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": true, "configurationClass": "org.apache.camel.component.aws.s3.S3Configuration", "configurationField": "configuration", "description": "Amazon AWS Secret Key" }
},
"properties": {
"bucketNameOrArn": { "kind": "path", "displayName": "Bucket Name Or Arn", "group": "common", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "secret": false, "description": "Bucket name or ARN" },
diff --git a/components/camel-aws-s3/src/main/docs/aws-s3-component.adoc b/components/camel-aws-s3/src/main/docs/aws-s3-component.adoc
index 435ae4c..d8118f1 100644
--- a/components/camel-aws-s3/src/main/docs/aws-s3-component.adoc
+++ b/components/camel-aws-s3/src/main/docs/aws-s3-component.adoc
@@ -47,16 +47,15 @@ The AWS S3 Storage Service component supports 37 options, which are listed below
[width="100%",cols="2,5,^1,2",options="header"]
|===
| Name | Description | Default | Type
-| *accessKey* (common) | Amazon AWS Access Key | | String
| *amazonS3Client* (common) | Reference to a com.amazonaws.services.s3.AmazonS3 in the registry. | | AmazonS3
| *autoCreateBucket* (common) | Setting the autocreation of the bucket | true | boolean
+| *configuration* (common) | The component configuration | | S3Configuration
| *pathStyleAccess* (common) | Whether or not the S3 client should use path style access | false | boolean
| *policy* (common) | The policy for this queue to set in the com.amazonaws.services.s3.AmazonS3#setBucketPolicy() method. | | String
| *proxyHost* (common) | To define a proxy host when instantiating the SQS client | | String
| *proxyPort* (common) | Specify a proxy port to be used inside the client definition. | | Integer
| *proxyProtocol* (common) | To define a proxy protocol when instantiating the S3 client. The value can be one of: HTTP, HTTPS | HTTPS | Protocol
| *region* (common) | The region in which S3 client needs to work. When using this parameter, the configuration will expect the capitalized name of the region (for example AP_EAST_1) You'll need to use the name Regions.EU_WEST_1.name() | | String
-| *secretKey* (common) | Amazon AWS Secret Key | | String
| *useIAMCredentials* (common) | Set whether the S3 client should expect to load credentials on an EC2 instance or to expect static credentials to be passed in. | false | boolean
| *encryptionMaterials* (common) | The encryption materials to use in case of Symmetric/Asymmetric client usage | | EncryptionMaterials
| *useEncryption* (common) | Define if encryption must be used or not | false | boolean
@@ -78,12 +77,13 @@ The AWS S3 Storage Service component supports 37 options, which are listed below
| *awsKMSKeyId* (producer) | Define the id of KMS key to use in case KMS is enabled | | String
| *useAwsKMS* (producer) | Define if KMS must be used or not | false | boolean
| *basicPropertyBinding* (advanced) | Whether the component should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities | false | boolean
-| *configuration* (advanced) | The AWS S3 default configuration | | S3Configuration
| *accelerateModeEnabled* ( advanced) | Define if Accelerate Mode enabled is true or false | false | boolean
| *chunkedEncodingDisabled* ( advanced) | Define if disabled Chunked Encoding is true or false | false | boolean
| *dualstackEnabled* ( advanced) | Define if Dualstack enabled is true or false | false | boolean
| *forceGlobalBucketAccessEnabled* ( advanced) | Define if Force Global Bucket Access enabled is true or false | false | boolean
| *payloadSigningEnabled* ( advanced) | Define if Payload Signing enabled is true or false | false | boolean
+| *accessKey* (security) | Amazon AWS Access Key | | String
+| *secretKey* (security) | Amazon AWS Secret Key | | String
|===
// component options: END
diff --git a/components/camel-aws-s3/src/main/java/org/apache/camel/component/aws/s3/S3Component.java b/components/camel-aws-s3/src/main/java/org/apache/camel/component/aws/s3/S3Component.java
index 4e2bdfb..8d513b3 100644
--- a/components/camel-aws-s3/src/main/java/org/apache/camel/component/aws/s3/S3Component.java
+++ b/components/camel-aws-s3/src/main/java/org/apache/camel/component/aws/s3/S3Component.java
@@ -30,13 +30,7 @@ import org.apache.camel.support.DefaultComponent;
public class S3Component extends DefaultComponent {
@Metadata
- private String accessKey;
- @Metadata
- private String secretKey;
- @Metadata
- private String region;
- @Metadata(label = "advanced")
- private S3Configuration configuration;
+ private S3Configuration configuration = new S3Configuration();
public S3Component() {
this(null);
@@ -60,9 +54,6 @@ public class S3Component extends DefaultComponent {
final S3Configuration configuration = this.configuration != null ? this.configuration.copy() : new S3Configuration();
configuration.setBucketName(remaining);
S3Endpoint endpoint = new S3Endpoint(uri, this, configuration);
- endpoint.getConfiguration().setAccessKey(accessKey);
- endpoint.getConfiguration().setSecretKey(secretKey);
- endpoint.getConfiguration().setRegion(region);
setProperties(endpoint, parameters);
checkAndSetRegistryClient(configuration);
if (!configuration.isUseIAMCredentials() && configuration.getAmazonS3Client() == null && (configuration.getAccessKey() == null || configuration.getSecretKey() == null)) {
@@ -77,46 +68,12 @@ public class S3Component extends DefaultComponent {
}
/**
- * The AWS S3 default configuration
+ * The component configuration
*/
public void setConfiguration(S3Configuration configuration) {
this.configuration = configuration;
}
- public String getAccessKey() {
- return accessKey;
- }
-
- /**
- * Amazon AWS Access Key
- */
- public void setAccessKey(String accessKey) {
- this.accessKey = accessKey;
- }
-
- public String getSecretKey() {
- return secretKey;
- }
-
- /**
- * Amazon AWS Secret Key
- */
- public void setSecretKey(String secretKey) {
- this.secretKey = secretKey;
- }
-
- public String getRegion() {
- return region;
- }
-
- /**
- * The region where the bucket is located. This option is used in the
- * `com.amazonaws.services.s3.model.CreateBucketRequest`.
- */
- public void setRegion(String region) {
- this.region = region;
- }
-
private void checkAndSetRegistryClient(S3Configuration configuration) {
Set<AmazonS3> clients = getCamelContext().getRegistry().findByType(AmazonS3.class);
if (clients.size() == 1) {
diff --git a/components/camel-aws-s3/src/test/java/org/apache/camel/component/aws/s3/S3ComponentConfigurationTest.java b/components/camel-aws-s3/src/test/java/org/apache/camel/component/aws/s3/S3ComponentConfigurationTest.java
index fc05a5c..d1e1259 100644
--- a/components/camel-aws-s3/src/test/java/org/apache/camel/component/aws/s3/S3ComponentConfigurationTest.java
+++ b/components/camel-aws-s3/src/test/java/org/apache/camel/component/aws/s3/S3ComponentConfigurationTest.java
@@ -135,8 +135,8 @@ public class S3ComponentConfigurationTest extends CamelTestSupport {
@Test
public void createEndpointWithComponentElements() throws Exception {
S3Component component = context.getComponent("aws-s3", S3Component.class);
- component.setAccessKey("XXX");
- component.setSecretKey("YYY");
+ component.getConfiguration().setAccessKey("XXX");
+ component.getConfiguration().setSecretKey("YYY");
S3Endpoint endpoint = (S3Endpoint)component.createEndpoint("aws-s3://MyBucket");
assertEquals("MyBucket", endpoint.getConfiguration().getBucketName());
@@ -147,9 +147,9 @@ public class S3ComponentConfigurationTest extends CamelTestSupport {
@Test
public void createEndpointWithComponentAndEndpointElements() throws Exception {
S3Component component = context.getComponent("aws-s3", S3Component.class);
- component.setAccessKey("XXX");
- component.setSecretKey("YYY");
- component.setRegion(Regions.US_WEST_1.toString());
+ component.getConfiguration().setAccessKey("XXX");
+ component.getConfiguration().setSecretKey("YYY");
+ component.getConfiguration().setRegion(Regions.US_WEST_1.toString());
S3Endpoint endpoint = (S3Endpoint)component.createEndpoint("aws-s3://MyBucket?accessKey=xxxxxx&secretKey=yyyyy®ion=US_EAST_1");
assertEquals("MyBucket", endpoint.getConfiguration().getBucketName());
diff --git a/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/AwsS3ComponentBuilderFactory.java b/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/AwsS3ComponentBuilderFactory.java
index c31ab4b..7315127 100644
--- a/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/AwsS3ComponentBuilderFactory.java
+++ b/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/AwsS3ComponentBuilderFactory.java
@@ -49,17 +49,6 @@ public interface AwsS3ComponentBuilderFactory {
*/
interface AwsS3ComponentBuilder extends ComponentBuilder<S3Component> {
/**
- * Amazon AWS Access Key.
- *
- * The option is a: <code>java.lang.String</code> type.
- *
- * Group: common
- */
- default AwsS3ComponentBuilder accessKey(java.lang.String accessKey) {
- doSetProperty("accessKey", accessKey);
- return this;
- }
- /**
* Reference to a com.amazonaws.services.s3.AmazonS3 in the registry.
*
* The option is a: <code>com.amazonaws.services.s3.AmazonS3</code>
@@ -85,6 +74,19 @@ public interface AwsS3ComponentBuilderFactory {
return this;
}
/**
+ * The component configuration.
+ *
+ * The option is a:
+ * <code>org.apache.camel.component.aws.s3.S3Configuration</code> type.
+ *
+ * Group: common
+ */
+ default AwsS3ComponentBuilder configuration(
+ org.apache.camel.component.aws.s3.S3Configuration configuration) {
+ doSetProperty("configuration", configuration);
+ return this;
+ }
+ /**
* Whether or not the S3 client should use path style access.
*
* The option is a: <code>boolean</code> type.
@@ -158,17 +160,6 @@ public interface AwsS3ComponentBuilderFactory {
return this;
}
/**
- * Amazon AWS Secret Key.
- *
- * The option is a: <code>java.lang.String</code> type.
- *
- * Group: common
- */
- default AwsS3ComponentBuilder secretKey(java.lang.String secretKey) {
- doSetProperty("secretKey", secretKey);
- return this;
- }
- /**
* Set whether the S3 client should expect to load credentials on an EC2
* instance or to expect static credentials to be passed in.
*
@@ -465,19 +456,6 @@ public interface AwsS3ComponentBuilderFactory {
return this;
}
/**
- * The AWS S3 default configuration.
- *
- * The option is a:
- * <code>org.apache.camel.component.aws.s3.S3Configuration</code> type.
- *
- * Group: advanced
- */
- default AwsS3ComponentBuilder configuration(
- org.apache.camel.component.aws.s3.S3Configuration configuration) {
- doSetProperty("configuration", configuration);
- return this;
- }
- /**
* Define if Accelerate Mode enabled is true or false.
*
* The option is a: <code>boolean</code> type.
@@ -541,6 +519,28 @@ public interface AwsS3ComponentBuilderFactory {
doSetProperty("payloadSigningEnabled", payloadSigningEnabled);
return this;
}
+ /**
+ * Amazon AWS Access Key.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: security
+ */
+ default AwsS3ComponentBuilder accessKey(java.lang.String accessKey) {
+ doSetProperty("accessKey", accessKey);
+ return this;
+ }
+ /**
+ * Amazon AWS Secret Key.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: security
+ */
+ default AwsS3ComponentBuilder secretKey(java.lang.String secretKey) {
+ doSetProperty("secretKey", secretKey);
+ return this;
+ }
}
class AwsS3ComponentBuilderImpl
@@ -565,16 +565,15 @@ public interface AwsS3ComponentBuilderFactory {
String name,
Object value) {
switch (name) {
- case "accessKey": ((S3Component) component).setAccessKey((java.lang.String) value); return true;
case "amazonS3Client": getOrCreateConfiguration((S3Component) component).setAmazonS3Client((com.amazonaws.services.s3.AmazonS3) value); return true;
case "autoCreateBucket": getOrCreateConfiguration((S3Component) component).setAutoCreateBucket((boolean) value); return true;
+ case "configuration": ((S3Component) component).setConfiguration((org.apache.camel.component.aws.s3.S3Configuration) value); return true;
case "pathStyleAccess": getOrCreateConfiguration((S3Component) component).setPathStyleAccess((boolean) value); return true;
case "policy": getOrCreateConfiguration((S3Component) component).setPolicy((java.lang.String) value); return true;
case "proxyHost": getOrCreateConfiguration((S3Component) component).setProxyHost((java.lang.String) value); return true;
case "proxyPort": getOrCreateConfiguration((S3Component) component).setProxyPort((java.lang.Integer) value); return true;
case "proxyProtocol": getOrCreateConfiguration((S3Component) component).setProxyProtocol((com.amazonaws.Protocol) value); return true;
case "region": getOrCreateConfiguration((S3Component) component).setRegion((java.lang.String) value); return true;
- case "secretKey": ((S3Component) component).setSecretKey((java.lang.String) value); return true;
case "useIAMCredentials": getOrCreateConfiguration((S3Component) component).setUseIAMCredentials((boolean) value); return true;
case "encryptionMaterials": getOrCreateConfiguration((S3Component) component).setEncryptionMaterials((com.amazonaws.services.s3.model.EncryptionMaterials) value); return true;
case "useEncryption": getOrCreateConfiguration((S3Component) component).setUseEncryption((boolean) value); return true;
@@ -596,12 +595,13 @@ public interface AwsS3ComponentBuilderFactory {
case "awsKMSKeyId": getOrCreateConfiguration((S3Component) component).setAwsKMSKeyId((java.lang.String) value); return true;
case "useAwsKMS": getOrCreateConfiguration((S3Component) component).setUseAwsKMS((boolean) value); return true;
case "basicPropertyBinding": ((S3Component) component).setBasicPropertyBinding((boolean) value); return true;
- case "configuration": ((S3Component) component).setConfiguration((org.apache.camel.component.aws.s3.S3Configuration) value); return true;
case "accelerateModeEnabled": getOrCreateConfiguration((S3Component) component).setAccelerateModeEnabled((boolean) value); return true;
case "chunkedEncodingDisabled": getOrCreateConfiguration((S3Component) component).setChunkedEncodingDisabled((boolean) value); return true;
case "dualstackEnabled": getOrCreateConfiguration((S3Component) component).setDualstackEnabled((boolean) value); return true;
case "forceGlobalBucketAccessEnabled": getOrCreateConfiguration((S3Component) component).setForceGlobalBucketAccessEnabled((boolean) value); return true;
case "payloadSigningEnabled": getOrCreateConfiguration((S3Component) component).setPayloadSigningEnabled((boolean) value); return true;
+ case "accessKey": getOrCreateConfiguration((S3Component) component).setAccessKey((java.lang.String) value); return true;
+ case "secretKey": getOrCreateConfiguration((S3Component) component).setSecretKey((java.lang.String) value); return true;
default: return false;
}
}
[camel] 01/03: CAMEL-14568 - Fixed AWS MQ
Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git
commit 5f4971245e031ef051e4ac1d8d0a85612c4c24fe
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Fri Feb 28 16:14:13 2020 +0100
CAMEL-14568 - Fixed AWS MQ
---
.../component/aws/mq/MQComponentConfigurer.java | 7 ++--
.../org/apache/camel/component/aws/mq/aws-mq.json | 8 ++--
.../src/main/docs/aws-mq-component.adoc | 2 +-
.../apache/camel/component/aws/mq/MQComponent.java | 48 ++--------------------
.../aws/mq/MQComponentConfigurationTest.java | 16 ++++----
.../dsl/AwsMqComponentBuilderFactory.java | 32 +++++++--------
6 files changed, 35 insertions(+), 78 deletions(-)
diff --git a/components/camel-aws-mq/src/generated/java/org/apache/camel/component/aws/mq/MQComponentConfigurer.java b/components/camel-aws-mq/src/generated/java/org/apache/camel/component/aws/mq/MQComponentConfigurer.java
index 9b329c4..583584f 100644
--- a/components/camel-aws-mq/src/generated/java/org/apache/camel/component/aws/mq/MQComponentConfigurer.java
+++ b/components/camel-aws-mq/src/generated/java/org/apache/camel/component/aws/mq/MQComponentConfigurer.java
@@ -23,9 +23,10 @@ public class MQComponentConfigurer extends PropertyConfigurerSupport implements
MQComponent target = (MQComponent) obj;
switch (ignoreCase ? name.toLowerCase() : name) {
case "accesskey":
- case "accessKey": target.setAccessKey(property(camelContext, java.lang.String.class, value)); return true;
+ case "accessKey": getOrCreateConfiguration(target).setAccessKey(property(camelContext, java.lang.String.class, value)); return true;
case "amazonmqclient":
case "amazonMqClient": getOrCreateConfiguration(target).setAmazonMqClient(property(camelContext, com.amazonaws.services.mq.AmazonMQ.class, value)); return true;
+ case "configuration": target.setConfiguration(property(camelContext, org.apache.camel.component.aws.mq.MQConfiguration.class, value)); return true;
case "lazystartproducer":
case "lazyStartProducer": target.setLazyStartProducer(property(camelContext, boolean.class, value)); return true;
case "operation": getOrCreateConfiguration(target).setOperation(property(camelContext, org.apache.camel.component.aws.mq.MQOperations.class, value)); return true;
@@ -35,13 +36,11 @@ public class MQComponentConfigurer extends PropertyConfigurerSupport implements
case "proxyPort": getOrCreateConfiguration(target).setProxyPort(property(camelContext, java.lang.Integer.class, value)); return true;
case "proxyprotocol":
case "proxyProtocol": getOrCreateConfiguration(target).setProxyProtocol(property(camelContext, com.amazonaws.Protocol.class, value)); return true;
- case "region": target.setRegion(property(camelContext, java.lang.String.class, value)); return true;
case "region": getOrCreateConfiguration(target).setRegion(property(camelContext, java.lang.String.class, value)); return true;
case "secretkey":
- case "secretKey": target.setSecretKey(property(camelContext, java.lang.String.class, value)); return true;
+ case "secretKey": getOrCreateConfiguration(target).setSecretKey(property(camelContext, java.lang.String.class, value)); return true;
case "basicpropertybinding":
case "basicPropertyBinding": target.setBasicPropertyBinding(property(camelContext, boolean.class, value)); return true;
- case "configuration": target.setConfiguration(property(camelContext, org.apache.camel.component.aws.mq.MQConfiguration.class, value)); return true;
default: return false;
}
}
diff --git a/components/camel-aws-mq/src/generated/resources/org/apache/camel/component/aws/mq/aws-mq.json b/components/camel-aws-mq/src/generated/resources/org/apache/camel/component/aws/mq/aws-mq.json
index d85082a..d946834 100644
--- a/components/camel-aws-mq/src/generated/resources/org/apache/camel/component/aws/mq/aws-mq.json
+++ b/components/camel-aws-mq/src/generated/resources/org/apache/camel/component/aws/mq/aws-mq.json
@@ -19,17 +19,17 @@
"version": "3.2.0-SNAPSHOT"
},
"componentProperties": {
- "accessKey": { "kind": "property", "displayName": "Access Key", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "description": "Amazon AWS Access Key" },
+ "accessKey": { "kind": "property", "displayName": "Access Key", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": true, "configurationClass": "org.apache.camel.component.aws.mq.MQConfiguration", "configurationField": "configuration", "description": "Amazon AWS Access Key" },
"amazonMqClient": { "kind": "property", "displayName": "Amazon Mq Client", "group": "producer", "label": "producer", "required": false, "type": "object", "javaType": "com.amazonaws.services.mq.AmazonMQ", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws.mq.MQConfiguration", "configurationField": "configuration", "description": "To use a existing configured AmazonMQClient as client" },
+ "configuration": { "kind": "property", "displayName": "Configuration", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.component.aws.mq.MQConfiguration", "deprecated": false, "secret": false, "description": "The Component configuration" },
"lazyStartProducer": { "kind": "property", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": 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 starting and cause the r [...]
"operation": { "kind": "property", "displayName": "Operation", "group": "producer", "label": "producer", "required": true, "type": "object", "javaType": "org.apache.camel.component.aws.mq.MQOperations", "enum": [ "listBrokers", "createBroker", "deleteBroker", "rebootBroker", "updateBroker", "describeBroker" ], "deprecated": false, "deprecationNote": "", "secret": false, "configurationClass": "org.apache.camel.component.aws.mq.MQConfiguration", "configurationField": "configuration", " [...]
"proxyHost": { "kind": "property", "displayName": "Proxy Host", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws.mq.MQConfiguration", "configurationField": "configuration", "description": "To define a proxy host when instantiating the MQ client" },
"proxyPort": { "kind": "property", "displayName": "Proxy Port", "group": "producer", "label": "producer", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws.mq.MQConfiguration", "configurationField": "configuration", "description": "To define a proxy port when instantiating the MQ client" },
"proxyProtocol": { "kind": "property", "displayName": "Proxy Protocol", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "com.amazonaws.Protocol", "enum": [ "HTTP", "HTTPS" ], "deprecated": false, "secret": false, "defaultValue": "HTTPS", "configurationClass": "org.apache.camel.component.aws.mq.MQConfiguration", "configurationField": "configuration", "description": "To define a proxy protocol when instantiating the MQ client" },
"region": { "kind": "property", "displayName": "Region", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws.mq.MQConfiguration", "configurationField": "configuration", "description": "The region in which MQ client needs to work. When using this parameter, the configuration will expect the capitalized name of the region (for example AP_EAST_1) [...]
- "secretKey": { "kind": "property", "displayName": "Secret Key", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "description": "Amazon AWS Secret Key" },
- "basicPropertyBinding": { "kind": "property", "displayName": "Basic Property Binding", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Whether the component should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities" },
- "configuration": { "kind": "property", "displayName": "Configuration", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.camel.component.aws.mq.MQConfiguration", "deprecated": false, "secret": false, "description": "The AWS MQ default configuration" }
+ "secretKey": { "kind": "property", "displayName": "Secret Key", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": true, "configurationClass": "org.apache.camel.component.aws.mq.MQConfiguration", "configurationField": "configuration", "description": "Amazon AWS Secret Key" },
+ "basicPropertyBinding": { "kind": "property", "displayName": "Basic Property Binding", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Whether the component should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities" }
},
"properties": {
"label": { "kind": "path", "displayName": "Label", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "secret": false, "configurationClass": "org.apache.camel.component.aws.mq.MQConfiguration", "configurationField": "configuration", "description": "Logical name" },
diff --git a/components/camel-aws-mq/src/main/docs/aws-mq-component.adoc b/components/camel-aws-mq/src/main/docs/aws-mq-component.adoc
index 54583f1..9f3acdb 100644
--- a/components/camel-aws-mq/src/main/docs/aws-mq-component.adoc
+++ b/components/camel-aws-mq/src/main/docs/aws-mq-component.adoc
@@ -39,6 +39,7 @@ The AWS MQ component supports 11 options, which are listed below.
| Name | Description | Default | Type
| *accessKey* (producer) | Amazon AWS Access Key | | String
| *amazonMqClient* (producer) | To use a existing configured AmazonMQClient as client | | AmazonMQ
+| *configuration* (producer) | The Component configuration | | MQConfiguration
| *lazyStartProducer* (producer) | 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 [...]
| *operation* (producer) | *Required* The operation to perform. It can be listBrokers,createBroker,deleteBroker. The value can be one of: listBrokers, createBroker, deleteBroker, rebootBroker, updateBroker, describeBroker | | MQOperations
| *proxyHost* (producer) | To define a proxy host when instantiating the MQ client | | String
@@ -47,7 +48,6 @@ The AWS MQ component supports 11 options, which are listed below.
| *region* (producer) | The region in which MQ client needs to work. When using this parameter, the configuration will expect the capitalized name of the region (for example AP_EAST_1) You'll need to use the name Regions.EU_WEST_1.name() | | String
| *secretKey* (producer) | Amazon AWS Secret Key | | String
| *basicPropertyBinding* (advanced) | Whether the component should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities | false | boolean
-| *configuration* (advanced) | The AWS MQ default configuration | | MQConfiguration
|===
// component options: END
diff --git a/components/camel-aws-mq/src/main/java/org/apache/camel/component/aws/mq/MQComponent.java b/components/camel-aws-mq/src/main/java/org/apache/camel/component/aws/mq/MQComponent.java
index a6b07d8..e538445 100644
--- a/components/camel-aws-mq/src/main/java/org/apache/camel/component/aws/mq/MQComponent.java
+++ b/components/camel-aws-mq/src/main/java/org/apache/camel/component/aws/mq/MQComponent.java
@@ -32,14 +32,8 @@ import org.apache.camel.support.DefaultComponent;
@Component("aws-mq")
public class MQComponent extends DefaultComponent {
- @Metadata
- private String accessKey;
- @Metadata
- private String secretKey;
- @Metadata
- private String region;
- @Metadata(label = "advanced")
- private MQConfiguration configuration;
+ @Metadata
+ private MQConfiguration configuration = new MQConfiguration();
public MQComponent() {
this(null);
@@ -55,9 +49,6 @@ public class MQComponent extends DefaultComponent {
protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) throws Exception {
MQConfiguration configuration = this.configuration != null ? this.configuration.copy() : new MQConfiguration();
MQEndpoint endpoint = new MQEndpoint(uri, this, configuration);
- endpoint.getConfiguration().setAccessKey(accessKey);
- endpoint.getConfiguration().setSecretKey(secretKey);
- endpoint.getConfiguration().setRegion(region);
setProperties(endpoint, parameters);
checkAndSetRegistryClient(configuration);
if (configuration.getAmazonMqClient() == null && (configuration.getAccessKey() == null || configuration.getSecretKey() == null)) {
@@ -72,45 +63,12 @@ public class MQComponent extends DefaultComponent {
}
/**
- * The AWS MQ default configuration
+ * The Component configuration
*/
public void setConfiguration(MQConfiguration configuration) {
this.configuration = configuration;
}
- public String getAccessKey() {
- return accessKey;
- }
-
- /**
- * Amazon AWS Access Key
- */
- public void setAccessKey(String accessKey) {
- this.accessKey = accessKey;
- }
-
- public String getSecretKey() {
- return secretKey;
- }
-
- /**
- * Amazon AWS Secret Key
- */
- public void setSecretKey(String secretKey) {
- this.secretKey = secretKey;
- }
-
- public String getRegion() {
- return region;
- }
-
- /**
- * The region in which MQ client needs to work
- */
- public void setRegion(String region) {
- this.region = region;
- }
-
private void checkAndSetRegistryClient(MQConfiguration configuration) {
Set<AmazonMQ> clients = getCamelContext().getRegistry().findByType(AmazonMQ.class);
if (clients.size() == 1) {
diff --git a/components/camel-aws-mq/src/test/java/org/apache/camel/component/aws/mq/MQComponentConfigurationTest.java b/components/camel-aws-mq/src/test/java/org/apache/camel/component/aws/mq/MQComponentConfigurationTest.java
index 5f4560f..490dfea 100644
--- a/components/camel-aws-mq/src/test/java/org/apache/camel/component/aws/mq/MQComponentConfigurationTest.java
+++ b/components/camel-aws-mq/src/test/java/org/apache/camel/component/aws/mq/MQComponentConfigurationTest.java
@@ -27,8 +27,8 @@ public class MQComponentConfigurationTest extends CamelTestSupport {
@Test
public void createEndpointWithComponentElements() throws Exception {
MQComponent component = context.getComponent("aws-mq", MQComponent.class);
- component.setAccessKey("XXX");
- component.setSecretKey("YYY");
+ component.getConfiguration().setAccessKey("XXX");
+ component.getConfiguration().setSecretKey("YYY");
MQEndpoint endpoint = (MQEndpoint)component.createEndpoint("aws-mq://MyQueue");
assertEquals("XXX", endpoint.getConfiguration().getAccessKey());
@@ -38,9 +38,9 @@ public class MQComponentConfigurationTest extends CamelTestSupport {
@Test
public void createEndpointWithComponentAndEndpointElements() throws Exception {
MQComponent component = context.getComponent("aws-mq", MQComponent.class);
- component.setAccessKey("XXX");
- component.setSecretKey("YYY");
- component.setRegion(Regions.US_WEST_1.toString());
+ component.getConfiguration().setAccessKey("XXX");
+ component.getConfiguration().setSecretKey("YYY");
+ component.getConfiguration().setRegion(Regions.US_WEST_1.toString());
MQEndpoint endpoint = (MQEndpoint)component.createEndpoint("aws-mq://MyQueue?accessKey=xxxxxx&secretKey=yyyyy®ion=US_EAST_1");
assertEquals("xxxxxx", endpoint.getConfiguration().getAccessKey());
@@ -51,9 +51,9 @@ public class MQComponentConfigurationTest extends CamelTestSupport {
@Test
public void createEndpointWithComponentEndpointElementsAndProxy() throws Exception {
MQComponent component = context.getComponent("aws-mq", MQComponent.class);
- component.setAccessKey("XXX");
- component.setSecretKey("YYY");
- component.setRegion(Regions.US_WEST_1.toString());
+ component.getConfiguration().setAccessKey("XXX");
+ component.getConfiguration().setSecretKey("YYY");
+ component.getConfiguration().setRegion(Regions.US_WEST_1.toString());
MQEndpoint endpoint = (MQEndpoint)component.createEndpoint("aws-mq://label?accessKey=xxxxxx&secretKey=yyyyy®ion=US_EAST_1&proxyHost=localhost&proxyPort=9000&proxyProtocol=HTTP");
assertEquals("xxxxxx", endpoint.getConfiguration().getAccessKey());
diff --git a/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/AwsMqComponentBuilderFactory.java b/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/AwsMqComponentBuilderFactory.java
index 00fd3ca..5bb83bb 100644
--- a/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/AwsMqComponentBuilderFactory.java
+++ b/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/AwsMqComponentBuilderFactory.java
@@ -71,6 +71,19 @@ public interface AwsMqComponentBuilderFactory {
return this;
}
/**
+ * The Component configuration.
+ *
+ * The option is a:
+ * <code>org.apache.camel.component.aws.mq.MQConfiguration</code> type.
+ *
+ * Group: producer
+ */
+ default AwsMqComponentBuilder configuration(
+ org.apache.camel.component.aws.mq.MQConfiguration configuration) {
+ doSetProperty("configuration", configuration);
+ return this;
+ }
+ /**
* 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
@@ -179,19 +192,6 @@ public interface AwsMqComponentBuilderFactory {
doSetProperty("basicPropertyBinding", basicPropertyBinding);
return this;
}
- /**
- * The AWS MQ default configuration.
- *
- * The option is a:
- * <code>org.apache.camel.component.aws.mq.MQConfiguration</code> type.
- *
- * Group: advanced
- */
- default AwsMqComponentBuilder configuration(
- org.apache.camel.component.aws.mq.MQConfiguration configuration) {
- doSetProperty("configuration", configuration);
- return this;
- }
}
class AwsMqComponentBuilderImpl
@@ -216,17 +216,17 @@ public interface AwsMqComponentBuilderFactory {
String name,
Object value) {
switch (name) {
- case "accessKey": ((MQComponent) component).setAccessKey((java.lang.String) value); return true;
+ case "accessKey": getOrCreateConfiguration((MQComponent) component).setAccessKey((java.lang.String) value); return true;
case "amazonMqClient": getOrCreateConfiguration((MQComponent) component).setAmazonMqClient((com.amazonaws.services.mq.AmazonMQ) value); return true;
+ case "configuration": ((MQComponent) component).setConfiguration((org.apache.camel.component.aws.mq.MQConfiguration) value); return true;
case "lazyStartProducer": ((MQComponent) component).setLazyStartProducer((boolean) value); return true;
case "operation": getOrCreateConfiguration((MQComponent) component).setOperation((org.apache.camel.component.aws.mq.MQOperations) value); return true;
case "proxyHost": getOrCreateConfiguration((MQComponent) component).setProxyHost((java.lang.String) value); return true;
case "proxyPort": getOrCreateConfiguration((MQComponent) component).setProxyPort((java.lang.Integer) value); return true;
case "proxyProtocol": getOrCreateConfiguration((MQComponent) component).setProxyProtocol((com.amazonaws.Protocol) value); return true;
case "region": getOrCreateConfiguration((MQComponent) component).setRegion((java.lang.String) value); return true;
- case "secretKey": ((MQComponent) component).setSecretKey((java.lang.String) value); return true;
+ case "secretKey": getOrCreateConfiguration((MQComponent) component).setSecretKey((java.lang.String) value); return true;
case "basicPropertyBinding": ((MQComponent) component).setBasicPropertyBinding((boolean) value); return true;
- case "configuration": ((MQComponent) component).setConfiguration((org.apache.camel.component.aws.mq.MQConfiguration) value); return true;
default: return false;
}
}
[camel] 02/03: CAMEL-14568 - Fixed AWS MSK
Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git
commit 27fe3f0a176f5f38fe99c5e083ba0f0c5f4836a4
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Fri Feb 28 16:22:20 2020 +0100
CAMEL-14568 - Fixed AWS MSK
---
.../component/aws/msk/MSKComponentConfigurer.java | 7 ++--
.../apache/camel/component/aws/msk/aws-msk.json | 8 ++--
.../src/main/docs/aws-msk-component.adoc | 2 +-
.../camel/component/aws/msk/MSKComponent.java | 48 ++--------------------
.../aws/msk/MSKComponentConfigurationTest.java | 16 ++++----
.../dsl/AwsMskComponentBuilderFactory.java | 34 +++++++--------
6 files changed, 36 insertions(+), 79 deletions(-)
diff --git a/components/camel-aws-msk/src/generated/java/org/apache/camel/component/aws/msk/MSKComponentConfigurer.java b/components/camel-aws-msk/src/generated/java/org/apache/camel/component/aws/msk/MSKComponentConfigurer.java
index 08c06ad..dcd2387 100644
--- a/components/camel-aws-msk/src/generated/java/org/apache/camel/component/aws/msk/MSKComponentConfigurer.java
+++ b/components/camel-aws-msk/src/generated/java/org/apache/camel/component/aws/msk/MSKComponentConfigurer.java
@@ -23,7 +23,8 @@ public class MSKComponentConfigurer extends PropertyConfigurerSupport implements
MSKComponent target = (MSKComponent) obj;
switch (ignoreCase ? name.toLowerCase() : name) {
case "accesskey":
- case "accessKey": target.setAccessKey(property(camelContext, java.lang.String.class, value)); return true;
+ case "accessKey": getOrCreateConfiguration(target).setAccessKey(property(camelContext, java.lang.String.class, value)); return true;
+ case "configuration": target.setConfiguration(property(camelContext, org.apache.camel.component.aws.msk.MSKConfiguration.class, value)); return true;
case "lazystartproducer":
case "lazyStartProducer": target.setLazyStartProducer(property(camelContext, boolean.class, value)); return true;
case "mskclient":
@@ -35,13 +36,11 @@ public class MSKComponentConfigurer extends PropertyConfigurerSupport implements
case "proxyPort": getOrCreateConfiguration(target).setProxyPort(property(camelContext, java.lang.Integer.class, value)); return true;
case "proxyprotocol":
case "proxyProtocol": getOrCreateConfiguration(target).setProxyProtocol(property(camelContext, com.amazonaws.Protocol.class, value)); return true;
- case "region": target.setRegion(property(camelContext, java.lang.String.class, value)); return true;
case "region": getOrCreateConfiguration(target).setRegion(property(camelContext, java.lang.String.class, value)); return true;
case "secretkey":
- case "secretKey": target.setSecretKey(property(camelContext, java.lang.String.class, value)); return true;
+ case "secretKey": getOrCreateConfiguration(target).setSecretKey(property(camelContext, java.lang.String.class, value)); return true;
case "basicpropertybinding":
case "basicPropertyBinding": target.setBasicPropertyBinding(property(camelContext, boolean.class, value)); return true;
- case "configuration": target.setConfiguration(property(camelContext, org.apache.camel.component.aws.msk.MSKConfiguration.class, value)); return true;
default: return false;
}
}
diff --git a/components/camel-aws-msk/src/generated/resources/org/apache/camel/component/aws/msk/aws-msk.json b/components/camel-aws-msk/src/generated/resources/org/apache/camel/component/aws/msk/aws-msk.json
index e6ee094..e0a4a33 100644
--- a/components/camel-aws-msk/src/generated/resources/org/apache/camel/component/aws/msk/aws-msk.json
+++ b/components/camel-aws-msk/src/generated/resources/org/apache/camel/component/aws/msk/aws-msk.json
@@ -19,7 +19,8 @@
"version": "3.2.0-SNAPSHOT"
},
"componentProperties": {
- "accessKey": { "kind": "property", "displayName": "Access Key", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "description": "Amazon AWS Access Key" },
+ "accessKey": { "kind": "property", "displayName": "Access Key", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": true, "configurationClass": "org.apache.camel.component.aws.msk.MSKConfiguration", "configurationField": "configuration", "description": "Amazon AWS Access Key" },
+ "configuration": { "kind": "property", "displayName": "Configuration", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.component.aws.msk.MSKConfiguration", "deprecated": false, "secret": false, "description": "The component configuration" },
"lazyStartProducer": { "kind": "property", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": 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 starting and cause the r [...]
"mskClient": { "kind": "property", "displayName": "Msk Client", "group": "producer", "label": "producer", "required": false, "type": "object", "javaType": "com.amazonaws.services.kafka.AWSKafka", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws.msk.MSKConfiguration", "configurationField": "configuration", "description": "To use a existing configured AWS MSK as client" },
"operation": { "kind": "property", "displayName": "Operation", "group": "producer", "label": "producer", "required": true, "type": "object", "javaType": "org.apache.camel.component.aws.msk.MSKOperations", "enum": [ "listClusters", "createCluster", "deleteCluster", "describeCluster" ], "deprecated": false, "deprecationNote": "", "secret": false, "configurationClass": "org.apache.camel.component.aws.msk.MSKConfiguration", "configurationField": "configuration", "description": "The opera [...]
@@ -27,9 +28,8 @@
"proxyPort": { "kind": "property", "displayName": "Proxy Port", "group": "producer", "label": "producer", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws.msk.MSKConfiguration", "configurationField": "configuration", "description": "To define a proxy port when instantiating the MSK client" },
"proxyProtocol": { "kind": "property", "displayName": "Proxy Protocol", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "com.amazonaws.Protocol", "enum": [ "HTTP", "HTTPS" ], "deprecated": false, "secret": false, "defaultValue": "HTTPS", "configurationClass": "org.apache.camel.component.aws.msk.MSKConfiguration", "configurationField": "configuration", "description": "To define a proxy protocol when instantiating the MSK client" },
"region": { "kind": "property", "displayName": "Region", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws.msk.MSKConfiguration", "configurationField": "configuration", "description": "The region in which MSK client needs to work. When using this parameter, the configuration will expect the capitalized name of the region (for example AP_EAST [...]
- "secretKey": { "kind": "property", "displayName": "Secret Key", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "description": "Amazon AWS Secret Key" },
- "basicPropertyBinding": { "kind": "property", "displayName": "Basic Property Binding", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Whether the component should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities" },
- "configuration": { "kind": "property", "displayName": "Configuration", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.camel.component.aws.msk.MSKConfiguration", "deprecated": false, "secret": false, "description": "The AWS MSK default configuration" }
+ "secretKey": { "kind": "property", "displayName": "Secret Key", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": true, "configurationClass": "org.apache.camel.component.aws.msk.MSKConfiguration", "configurationField": "configuration", "description": "Amazon AWS Secret Key" },
+ "basicPropertyBinding": { "kind": "property", "displayName": "Basic Property Binding", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Whether the component should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities" }
},
"properties": {
"label": { "kind": "path", "displayName": "Label", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "secret": false, "configurationClass": "org.apache.camel.component.aws.msk.MSKConfiguration", "configurationField": "configuration", "description": "Logical name" },
diff --git a/components/camel-aws-msk/src/main/docs/aws-msk-component.adoc b/components/camel-aws-msk/src/main/docs/aws-msk-component.adoc
index cec670e..d647cc3 100644
--- a/components/camel-aws-msk/src/main/docs/aws-msk-component.adoc
+++ b/components/camel-aws-msk/src/main/docs/aws-msk-component.adoc
@@ -38,6 +38,7 @@ The AWS MSK component supports 11 options, which are listed below.
|===
| Name | Description | Default | Type
| *accessKey* (producer) | Amazon AWS Access Key | | String
+| *configuration* (producer) | The component configuration | | MSKConfiguration
| *lazyStartProducer* (producer) | 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 [...]
| *mskClient* (producer) | To use a existing configured AWS MSK as client | | AWSKafka
| *operation* (producer) | *Required* The operation to perform. The value can be one of: listClusters, createCluster, deleteCluster, describeCluster | | MSKOperations
@@ -47,7 +48,6 @@ The AWS MSK component supports 11 options, which are listed below.
| *region* (producer) | The region in which MSK client needs to work. When using this parameter, the configuration will expect the capitalized name of the region (for example AP_EAST_1) You'll need to use the name Regions.EU_WEST_1.name() | | String
| *secretKey* (producer) | Amazon AWS Secret Key | | String
| *basicPropertyBinding* (advanced) | Whether the component should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities | false | boolean
-| *configuration* (advanced) | The AWS MSK default configuration | | MSKConfiguration
|===
// component options: END
diff --git a/components/camel-aws-msk/src/main/java/org/apache/camel/component/aws/msk/MSKComponent.java b/components/camel-aws-msk/src/main/java/org/apache/camel/component/aws/msk/MSKComponent.java
index a5b4285..09afbdc 100644
--- a/components/camel-aws-msk/src/main/java/org/apache/camel/component/aws/msk/MSKComponent.java
+++ b/components/camel-aws-msk/src/main/java/org/apache/camel/component/aws/msk/MSKComponent.java
@@ -32,14 +32,8 @@ import org.apache.camel.support.DefaultComponent;
@Component("aws-msk")
public class MSKComponent extends DefaultComponent {
- @Metadata
- private String accessKey;
- @Metadata
- private String secretKey;
- @Metadata
- private String region;
- @Metadata(label = "advanced")
- private MSKConfiguration configuration;
+ @Metadata
+ private MSKConfiguration configuration = new MSKConfiguration();
public MSKComponent() {
this(null);
@@ -55,9 +49,6 @@ public class MSKComponent extends DefaultComponent {
protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) throws Exception {
MSKConfiguration configuration = this.configuration != null ? this.configuration.copy() : new MSKConfiguration();
MSKEndpoint endpoint = new MSKEndpoint(uri, this, configuration);
- endpoint.getConfiguration().setAccessKey(accessKey);
- endpoint.getConfiguration().setSecretKey(secretKey);
- endpoint.getConfiguration().setRegion(region);
setProperties(endpoint, parameters);
checkAndSetRegistryClient(configuration);
if (configuration.getMskClient() == null && (configuration.getAccessKey() == null || configuration.getSecretKey() == null)) {
@@ -71,45 +62,12 @@ public class MSKComponent extends DefaultComponent {
}
/**
- * The AWS MSK default configuration
+ * The component configuration
*/
public void setConfiguration(MSKConfiguration configuration) {
this.configuration = configuration;
}
- public String getAccessKey() {
- return accessKey;
- }
-
- /**
- * Amazon AWS Access Key
- */
- public void setAccessKey(String accessKey) {
- this.accessKey = accessKey;
- }
-
- public String getSecretKey() {
- return secretKey;
- }
-
- /**
- * Amazon AWS Secret Key
- */
- public void setSecretKey(String secretKey) {
- this.secretKey = secretKey;
- }
-
- public String getRegion() {
- return region;
- }
-
- /**
- * The region in which MSK client needs to work
- */
- public void setRegion(String region) {
- this.region = region;
- }
-
private void checkAndSetRegistryClient(MSKConfiguration configuration) {
Set<AWSKafka> clients = getCamelContext().getRegistry().findByType(AWSKafka.class);
if (clients.size() == 1) {
diff --git a/components/camel-aws-msk/src/test/java/org/apache/camel/component/aws/msk/MSKComponentConfigurationTest.java b/components/camel-aws-msk/src/test/java/org/apache/camel/component/aws/msk/MSKComponentConfigurationTest.java
index 9f68f72..8d02369 100644
--- a/components/camel-aws-msk/src/test/java/org/apache/camel/component/aws/msk/MSKComponentConfigurationTest.java
+++ b/components/camel-aws-msk/src/test/java/org/apache/camel/component/aws/msk/MSKComponentConfigurationTest.java
@@ -26,8 +26,8 @@ public class MSKComponentConfigurationTest extends CamelTestSupport {
@Test
public void createEndpointWithComponentElements() throws Exception {
MSKComponent component = context.getComponent("aws-msk", MSKComponent.class);
- component.setAccessKey("XXX");
- component.setSecretKey("YYY");
+ component.getConfiguration().setAccessKey("XXX");
+ component.getConfiguration().setSecretKey("YYY");
MSKEndpoint endpoint = (MSKEndpoint)component.createEndpoint("aws-msk://label");
assertEquals("XXX", endpoint.getConfiguration().getAccessKey());
@@ -37,9 +37,9 @@ public class MSKComponentConfigurationTest extends CamelTestSupport {
@Test
public void createEndpointWithComponentAndEndpointElements() throws Exception {
MSKComponent component = context.getComponent("aws-msk", MSKComponent.class);
- component.setAccessKey("XXX");
- component.setSecretKey("YYY");
- component.setRegion(Regions.US_WEST_1.toString());
+ component.getConfiguration().setAccessKey("XXX");
+ component.getConfiguration().setSecretKey("YYY");
+ component.getConfiguration().setRegion(Regions.US_WEST_1.toString());
MSKEndpoint endpoint = (MSKEndpoint)component.createEndpoint("aws-msk://label?accessKey=xxxxxx&secretKey=yyyyy®ion=US_EAST_1");
assertEquals("xxxxxx", endpoint.getConfiguration().getAccessKey());
@@ -50,9 +50,9 @@ public class MSKComponentConfigurationTest extends CamelTestSupport {
@Test
public void createEndpointWithComponentEndpointElementsAndProxy() throws Exception {
MSKComponent component = context.getComponent("aws-msk", MSKComponent.class);
- component.setAccessKey("XXX");
- component.setSecretKey("YYY");
- component.setRegion(Regions.US_WEST_1.toString());
+ component.getConfiguration().setAccessKey("XXX");
+ component.getConfiguration().setSecretKey("YYY");
+ component.getConfiguration().setRegion(Regions.US_WEST_1.toString());
MSKEndpoint endpoint = (MSKEndpoint)component.createEndpoint("aws-msk://label?accessKey=xxxxxx&secretKey=yyyyy®ion=US_EAST_1&proxyHost=localhost&proxyPort=9000&proxyProtocol=HTTP");
assertEquals("xxxxxx", endpoint.getConfiguration().getAccessKey());
diff --git a/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/AwsMskComponentBuilderFactory.java b/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/AwsMskComponentBuilderFactory.java
index d849bab..b6f45ce 100644
--- a/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/AwsMskComponentBuilderFactory.java
+++ b/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/AwsMskComponentBuilderFactory.java
@@ -58,6 +58,20 @@ public interface AwsMskComponentBuilderFactory {
return this;
}
/**
+ * The component configuration.
+ *
+ * The option is a:
+ * <code>org.apache.camel.component.aws.msk.MSKConfiguration</code>
+ * type.
+ *
+ * Group: producer
+ */
+ default AwsMskComponentBuilder configuration(
+ org.apache.camel.component.aws.msk.MSKConfiguration configuration) {
+ doSetProperty("configuration", configuration);
+ return this;
+ }
+ /**
* 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
@@ -178,20 +192,6 @@ public interface AwsMskComponentBuilderFactory {
doSetProperty("basicPropertyBinding", basicPropertyBinding);
return this;
}
- /**
- * The AWS MSK default configuration.
- *
- * The option is a:
- * <code>org.apache.camel.component.aws.msk.MSKConfiguration</code>
- * type.
- *
- * Group: advanced
- */
- default AwsMskComponentBuilder configuration(
- org.apache.camel.component.aws.msk.MSKConfiguration configuration) {
- doSetProperty("configuration", configuration);
- return this;
- }
}
class AwsMskComponentBuilderImpl
@@ -216,7 +216,8 @@ public interface AwsMskComponentBuilderFactory {
String name,
Object value) {
switch (name) {
- case "accessKey": ((MSKComponent) component).setAccessKey((java.lang.String) value); return true;
+ case "accessKey": getOrCreateConfiguration((MSKComponent) component).setAccessKey((java.lang.String) value); return true;
+ case "configuration": ((MSKComponent) component).setConfiguration((org.apache.camel.component.aws.msk.MSKConfiguration) value); return true;
case "lazyStartProducer": ((MSKComponent) component).setLazyStartProducer((boolean) value); return true;
case "mskClient": getOrCreateConfiguration((MSKComponent) component).setMskClient((com.amazonaws.services.kafka.AWSKafka) value); return true;
case "operation": getOrCreateConfiguration((MSKComponent) component).setOperation((org.apache.camel.component.aws.msk.MSKOperations) value); return true;
@@ -224,9 +225,8 @@ public interface AwsMskComponentBuilderFactory {
case "proxyPort": getOrCreateConfiguration((MSKComponent) component).setProxyPort((java.lang.Integer) value); return true;
case "proxyProtocol": getOrCreateConfiguration((MSKComponent) component).setProxyProtocol((com.amazonaws.Protocol) value); return true;
case "region": getOrCreateConfiguration((MSKComponent) component).setRegion((java.lang.String) value); return true;
- case "secretKey": ((MSKComponent) component).setSecretKey((java.lang.String) value); return true;
+ case "secretKey": getOrCreateConfiguration((MSKComponent) component).setSecretKey((java.lang.String) value); return true;
case "basicPropertyBinding": ((MSKComponent) component).setBasicPropertyBinding((boolean) value); return true;
- case "configuration": ((MSKComponent) component).setConfiguration((org.apache.camel.component.aws.msk.MSKConfiguration) value); return true;
default: return false;
}
}