This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git
commit f4f11cb366d5fd2f3b2e85cf016cce0f53d6c59a Author: Claus Ibsen <[email protected]> AuthorDate: Fri Feb 28 11:41:52 2020 +0100 CAMEL-14568: Regen --- .../KinesisFirehose2ComponentConfigurer.java | 15 +++ .../aws2/kinesis/Kinesis2ComponentConfigurer.java | 25 ++++ .../aws2/firehose/aws2-kinesis-firehose.json | 4 + .../camel/component/aws2/kinesis/aws2-kinesis.json | 9 ++ .../src/main/docs/aws2-kinesis-component.adoc | 11 +- .../main/docs/aws2-kinesis-firehose-component.adoc | 6 +- .../component/kafka/KafkaComponentConfigurer.java | 4 +- .../org/apache/camel/component/kafka/kafka.json | 6 +- .../camel-kafka/src/main/docs/kafka-component.adoc | 6 +- .../camel/component/kafka/KafkaComponent.java | 19 --- .../camel/component/kafka/KafkaConfiguration.java | 2 + .../dsl/Aws2KinesisComponentBuilderFactory.java | 137 +++++++++++++++++++++ ...Aws2KinesisFirehoseComponentBuilderFactory.java | 67 ++++++++++ .../dsl/KafkaComponentBuilderFactory.java | 30 ++--- .../modules/ROOT/pages/aws2-kinesis-component.adoc | 11 +- .../pages/aws2-kinesis-firehose-component.adoc | 6 +- .../modules/ROOT/pages/kafka-component.adoc | 6 +- 17 files changed, 316 insertions(+), 48 deletions(-) diff --git a/components/camel-aws2-kinesis/src/generated/java/org/apache/camel/component/aws2/firehose/KinesisFirehose2ComponentConfigurer.java b/components/camel-aws2-kinesis/src/generated/java/org/apache/camel/component/aws2/firehose/KinesisFirehose2ComponentConfigurer.java index da6f21f..331eb0d 100644 --- a/components/camel-aws2-kinesis/src/generated/java/org/apache/camel/component/aws2/firehose/KinesisFirehose2ComponentConfigurer.java +++ b/components/camel-aws2-kinesis/src/generated/java/org/apache/camel/component/aws2/firehose/KinesisFirehose2ComponentConfigurer.java @@ -11,14 +11,29 @@ import org.apache.camel.support.component.PropertyConfigurerSupport; @SuppressWarnings("unchecked") public class KinesisFirehose2ComponentConfigurer extends PropertyConfigurerSupport implements GeneratedPropertyConfigurer { + private org.apache.camel.component.aws2.firehose.KinesisFirehose2Configuration getOrCreateConfiguration(KinesisFirehose2Component target) { + if (target.getConfiguration() == null) { + target.setConfiguration(new org.apache.camel.component.aws2.firehose.KinesisFirehose2Configuration()); + } + return target.getConfiguration(); + } + @Override public boolean configure(CamelContext camelContext, Object obj, String name, Object value, boolean ignoreCase) { KinesisFirehose2Component target = (KinesisFirehose2Component) obj; switch (ignoreCase ? name.toLowerCase() : name) { case "accesskey": case "accessKey": target.setAccessKey(property(camelContext, java.lang.String.class, value)); return true; + case "amazonkinesisfirehoseclient": + case "amazonKinesisFirehoseClient": getOrCreateConfiguration(target).setAmazonKinesisFirehoseClient(property(camelContext, software.amazon.awssdk.services.firehose.FirehoseClient.class, value)); return true; case "lazystartproducer": case "lazyStartProducer": target.setLazyStartProducer(property(camelContext, boolean.class, value)); return true; + case "proxyhost": + case "proxyHost": getOrCreateConfiguration(target).setProxyHost(property(camelContext, java.lang.String.class, value)); return true; + case "proxyport": + case "proxyPort": getOrCreateConfiguration(target).setProxyPort(property(camelContext, java.lang.Integer.class, value)); return true; + case "proxyprotocol": + case "proxyProtocol": getOrCreateConfiguration(target).setProxyProtocol(property(camelContext, software.amazon.awssdk.core.Protocol.class, value)); return true; case "region": 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; diff --git a/components/camel-aws2-kinesis/src/generated/java/org/apache/camel/component/aws2/kinesis/Kinesis2ComponentConfigurer.java b/components/camel-aws2-kinesis/src/generated/java/org/apache/camel/component/aws2/kinesis/Kinesis2ComponentConfigurer.java index 298f2be..dae5a60 100644 --- a/components/camel-aws2-kinesis/src/generated/java/org/apache/camel/component/aws2/kinesis/Kinesis2ComponentConfigurer.java +++ b/components/camel-aws2-kinesis/src/generated/java/org/apache/camel/component/aws2/kinesis/Kinesis2ComponentConfigurer.java @@ -11,17 +11,42 @@ import org.apache.camel.support.component.PropertyConfigurerSupport; @SuppressWarnings("unchecked") public class Kinesis2ComponentConfigurer extends PropertyConfigurerSupport implements GeneratedPropertyConfigurer { + private org.apache.camel.component.aws2.kinesis.Kinesis2Configuration getOrCreateConfiguration(Kinesis2Component target) { + if (target.getConfiguration() == null) { + target.setConfiguration(new org.apache.camel.component.aws2.kinesis.Kinesis2Configuration()); + } + return target.getConfiguration(); + } + @Override public boolean configure(CamelContext camelContext, Object obj, String name, Object value, boolean ignoreCase) { Kinesis2Component target = (Kinesis2Component) obj; switch (ignoreCase ? name.toLowerCase() : name) { case "accesskey": case "accessKey": target.setAccessKey(property(camelContext, java.lang.String.class, value)); return true; + case "amazonkinesisclient": + case "amazonKinesisClient": getOrCreateConfiguration(target).setAmazonKinesisClient(property(camelContext, software.amazon.awssdk.services.kinesis.KinesisClient.class, value)); return true; + case "proxyhost": + case "proxyHost": getOrCreateConfiguration(target).setProxyHost(property(camelContext, java.lang.String.class, value)); return true; + case "proxyport": + case "proxyPort": getOrCreateConfiguration(target).setProxyPort(property(camelContext, java.lang.Integer.class, value)); return true; + case "proxyprotocol": + case "proxyProtocol": getOrCreateConfiguration(target).setProxyProtocol(property(camelContext, software.amazon.awssdk.core.Protocol.class, value)); return true; case "region": 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 "bridgeerrorhandler": case "bridgeErrorHandler": target.setBridgeErrorHandler(property(camelContext, boolean.class, value)); return true; + case "iteratortype": + case "iteratorType": getOrCreateConfiguration(target).setIteratorType(property(camelContext, software.amazon.awssdk.services.kinesis.model.ShardIteratorType.class, value)); return true; + case "maxresultsperrequest": + case "maxResultsPerRequest": getOrCreateConfiguration(target).setMaxResultsPerRequest(property(camelContext, int.class, value)); return true; + case "sequencenumber": + case "sequenceNumber": getOrCreateConfiguration(target).setSequenceNumber(property(camelContext, java.lang.String.class, value)); return true; + case "shardclosed": + case "shardClosed": getOrCreateConfiguration(target).setShardClosed(property(camelContext, org.apache.camel.component.aws2.kinesis.Kinesis2ShardClosedStrategyEnum.class, value)); return true; + case "shardid": + case "shardId": getOrCreateConfiguration(target).setShardId(property(camelContext, java.lang.String.class, value)); return true; case "lazystartproducer": case "lazyStartProducer": target.setLazyStartProducer(property(camelContext, boolean.class, value)); return true; case "basicpropertybinding": diff --git a/components/camel-aws2-kinesis/src/generated/resources/org/apache/camel/component/aws2/firehose/aws2-kinesis-firehose.json b/components/camel-aws2-kinesis/src/generated/resources/org/apache/camel/component/aws2/firehose/aws2-kinesis-firehose.json index 009a075..548a4b4 100644 --- a/components/camel-aws2-kinesis/src/generated/resources/org/apache/camel/component/aws2/firehose/aws2-kinesis-firehose.json +++ b/components/camel-aws2-kinesis/src/generated/resources/org/apache/camel/component/aws2/firehose/aws2-kinesis-firehose.json @@ -20,7 +20,11 @@ }, "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" }, + "amazonKinesisFirehoseClient": { "kind": "property", "displayName": "Amazon Kinesis Firehose Client", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.firehose.FirehoseClient", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.firehose.KinesisFirehose2Configuration", "configurationField": "configuration", "description": "Amazon Kinesis Firehose client to use for all requests [...] "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 [...] + "proxyHost": { "kind": "property", "displayName": "Proxy Host", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.firehose.KinesisFirehose2Configuration", "configurationField": "configuration", "description": "To define a proxy host when instantiating the Kinesis Firehose client" }, + "proxyPort": { "kind": "property", "displayName": "Proxy Port", "group": "producer", "label": "", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.firehose.KinesisFirehose2Configuration", "configurationField": "configuration", "description": "To define a proxy port when instantiating the Kinesis Firehose client" }, + "proxyProtocol": { "kind": "property", "displayName": "Proxy Protocol", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "software.amazon.awssdk.core.Protocol", "enum": [ "HTTP", "HTTPS" ], "deprecated": false, "secret": false, "defaultValue": "HTTPS", "configurationClass": "org.apache.camel.component.aws2.firehose.KinesisFirehose2Configuration", "configurationField": "configuration", "description": "To define a proxy protocol when instantiating the [...] "region": { "kind": "property", "displayName": "Region", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "description": "Amazon AWS Region" }, "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" }, diff --git a/components/camel-aws2-kinesis/src/generated/resources/org/apache/camel/component/aws2/kinesis/aws2-kinesis.json b/components/camel-aws2-kinesis/src/generated/resources/org/apache/camel/component/aws2/kinesis/aws2-kinesis.json index 61cf590..d0aea7a 100644 --- a/components/camel-aws2-kinesis/src/generated/resources/org/apache/camel/component/aws2/kinesis/aws2-kinesis.json +++ b/components/camel-aws2-kinesis/src/generated/resources/org/apache/camel/component/aws2/kinesis/aws2-kinesis.json @@ -20,9 +20,18 @@ }, "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" }, + "amazonKinesisClient": { "kind": "property", "displayName": "Amazon Kinesis Client", "group": "common", "label": "", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.kinesis.KinesisClient", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.kinesis.Kinesis2Configuration", "configurationField": "configuration", "description": "Amazon Kinesis client to use for all requests for this endpoint" }, + "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.aws2.kinesis.Kinesis2Configuration", "configurationField": "configuration", "description": "To define a proxy host when instantiating the Kinesis 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.aws2.kinesis.Kinesis2Configuration", "configurationField": "configuration", "description": "To define a proxy port when instantiating the Kinesis client" }, + "proxyProtocol": { "kind": "property", "displayName": "Proxy Protocol", "group": "common", "label": "", "required": false, "type": "object", "javaType": "software.amazon.awssdk.core.Protocol", "enum": [ "HTTP", "HTTPS" ], "deprecated": false, "secret": false, "defaultValue": "HTTPS", "configurationClass": "org.apache.camel.component.aws2.kinesis.Kinesis2Configuration", "configurationField": "configuration", "description": "To define a proxy protocol when instantiating the Kinesis client" }, "region": { "kind": "property", "displayName": "Region", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "description": "Amazon AWS Region" }, "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" }, "bridgeErrorHandler": { "kind": "property", "displayName": "Bridge Error Handler", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by [...] + "iteratorType": { "kind": "property", "displayName": "Iterator Type", "group": "consumer", "label": "consumer", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.kinesis.model.ShardIteratorType", "enum": [ "AT_SEQUENCE_NUMBER", "AFTER_SEQUENCE_NUMBER", "TRIM_HORIZON", "LATEST", "AT_TIMESTAMP", "null" ], "deprecated": false, "secret": false, "defaultValue": "TRIM_HORIZON", "configurationClass": "org.apache.camel.component.aws2.kinesis.Kinesis2Configurat [...] + "maxResultsPerRequest": { "kind": "property", "displayName": "Max Results Per Request", "group": "consumer", "label": "consumer", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "secret": false, "defaultValue": "1", "configurationClass": "org.apache.camel.component.aws2.kinesis.Kinesis2Configuration", "configurationField": "configuration", "description": "Maximum number of records that will be fetched in each poll" }, + "sequenceNumber": { "kind": "property", "displayName": "Sequence Number", "group": "consumer", "label": "consumer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.kinesis.Kinesis2Configuration", "configurationField": "configuration", "description": "The sequence number to start polling from. Required if iteratorType is set to AFTER_SEQUENCE_NUMBER or AT_SEQUENCE_NUMBER" }, + "shardClosed": { "kind": "property", "displayName": "Shard Closed", "group": "consumer", "label": "consumer", "required": false, "type": "object", "javaType": "org.apache.camel.component.aws2.kinesis.Kinesis2ShardClosedStrategyEnum", "enum": [ "ignore", "fail", "silent" ], "deprecated": false, "secret": false, "defaultValue": "ignore", "configurationClass": "org.apache.camel.component.aws2.kinesis.Kinesis2Configuration", "configurationField": "configuration", "description": "Define w [...] + "shardId": { "kind": "property", "displayName": "Shard Id", "group": "consumer", "label": "consumer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.kinesis.Kinesis2Configuration", "configurationField": "configuration", "description": "Defines which shardId in the Kinesis stream to get records from" }, "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 [...] "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.aws2.kinesis.Kinesis2Configuration", "deprecated": false, "secret": false, "description": "The AWS S3 default configuration" } diff --git a/components/camel-aws2-kinesis/src/main/docs/aws2-kinesis-component.adoc b/components/camel-aws2-kinesis/src/main/docs/aws2-kinesis-component.adoc index cfb71a5..d89007a 100644 --- a/components/camel-aws2-kinesis/src/main/docs/aws2-kinesis-component.adoc +++ b/components/camel-aws2-kinesis/src/main/docs/aws2-kinesis-component.adoc @@ -36,7 +36,7 @@ The stream needs to be created prior to it being used. + // component options: START -The AWS 2 Kinesis component supports 7 options, which are listed below. +The AWS 2 Kinesis component supports 16 options, which are listed below. @@ -44,9 +44,18 @@ The AWS 2 Kinesis component supports 7 options, which are listed below. |=== | Name | Description | Default | Type | *accessKey* (common) | Amazon AWS Access Key | | String +| *amazonKinesisClient* (common) | Amazon Kinesis client to use for all requests for this endpoint | | KinesisClient +| *proxyHost* (common) | To define a proxy host when instantiating the Kinesis client | | String +| *proxyPort* (common) | To define a proxy port when instantiating the Kinesis client | | Integer +| *proxyProtocol* (common) | To define a proxy protocol when instantiating the Kinesis client. The value can be one of: HTTP, HTTPS | HTTPS | Protocol | *region* (common) | Amazon AWS Region | | String | *secretKey* (common) | Amazon AWS Secret Key | | String | *bridgeErrorHandler* (consumer) | 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. | false | boolean +| *iteratorType* (consumer) | Defines where in the Kinesis stream to start getting records. The value can be one of: AT_SEQUENCE_NUMBER, AFTER_SEQUENCE_NUMBER, TRIM_HORIZON, LATEST, AT_TIMESTAMP, null | TRIM_HORIZON | ShardIteratorType +| *maxResultsPerRequest* (consumer) | Maximum number of records that will be fetched in each poll | 1 | int +| *sequenceNumber* (consumer) | The sequence number to start polling from. Required if iteratorType is set to AFTER_SEQUENCE_NUMBER or AT_SEQUENCE_NUMBER | | String +| *shardClosed* (consumer) | Define what will be the behavior in case of shard closed. Possible value are ignore, silent and fail. In case of ignore a message will be logged and the consumer will restart from the beginning,in case of silent there will be no logging and the consumer will start from the beginning,in case of fail a ReachedClosedStateException will be raised. The value can be one of: ignore, fail, silent | ignore | Kinesis2ShardClosedStrategyEnum +| *shardId* (consumer) | Defines which shardId in the Kinesis stream to get records from | | String | *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 [...] | *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 | | Kinesis2Configuration diff --git a/components/camel-aws2-kinesis/src/main/docs/aws2-kinesis-firehose-component.adoc b/components/camel-aws2-kinesis/src/main/docs/aws2-kinesis-firehose-component.adoc index 85848b3..62d7691 100644 --- a/components/camel-aws2-kinesis/src/main/docs/aws2-kinesis-firehose-component.adoc +++ b/components/camel-aws2-kinesis/src/main/docs/aws2-kinesis-firehose-component.adoc @@ -35,7 +35,7 @@ The stream needs to be created prior to it being used. + // component options: START -The AWS 2 Kinesis Firehose component supports 6 options, which are listed below. +The AWS 2 Kinesis Firehose component supports 10 options, which are listed below. @@ -43,7 +43,11 @@ The AWS 2 Kinesis Firehose component supports 6 options, which are listed below. |=== | Name | Description | Default | Type | *accessKey* (producer) | Amazon AWS Access Key | | String +| *amazonKinesisFirehoseClient* (producer) | Amazon Kinesis Firehose client to use for all requests for this endpoint | | FirehoseClient | *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 [...] +| *proxyHost* (producer) | To define a proxy host when instantiating the Kinesis Firehose client | | String +| *proxyPort* (producer) | To define a proxy port when instantiating the Kinesis Firehose client | | Integer +| *proxyProtocol* (producer) | To define a proxy protocol when instantiating the Kinesis Firehose client. The value can be one of: HTTP, HTTPS | HTTPS | Protocol | *region* (producer) | Amazon AWS Region | | 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 diff --git a/components/camel-kafka/src/generated/java/org/apache/camel/component/kafka/KafkaComponentConfigurer.java b/components/camel-kafka/src/generated/java/org/apache/camel/component/kafka/KafkaComponentConfigurer.java index 4a6a499..8e4160b 100644 --- a/components/camel-kafka/src/generated/java/org/apache/camel/component/kafka/KafkaComponentConfigurer.java +++ b/components/camel-kafka/src/generated/java/org/apache/camel/component/kafka/KafkaComponentConfigurer.java @@ -199,12 +199,12 @@ public class KafkaComponentConfigurer extends PropertyConfigurerSupport implemen case "sslProvider": getOrCreateConfiguration(target).setSslProvider(property(camelContext, java.lang.String.class, value)); return true; case "ssltrustmanageralgorithm": case "sslTrustmanagerAlgorithm": getOrCreateConfiguration(target).setSslTrustmanagerAlgorithm(property(camelContext, java.lang.String.class, value)); return true; + case "ssltruststorelocation": + case "sslTruststoreLocation": getOrCreateConfiguration(target).setSslTruststoreLocation(property(camelContext, java.lang.String.class, value)); return true; case "ssltruststoretype": case "sslTruststoreType": getOrCreateConfiguration(target).setSslTruststoreType(property(camelContext, java.lang.String.class, value)); return true; case "schemaregistryurl": case "schemaRegistryURL": getOrCreateConfiguration(target).setSchemaRegistryURL(property(camelContext, java.lang.String.class, value)); return true; - case "ssltruststorelocation": - case "sslTruststoreLocation": getOrCreateConfiguration(target).setSslTruststoreLocation(property(camelContext, java.lang.String.class, value)); return true; case "ssltruststorepassword": case "sslTruststorePassword": getOrCreateConfiguration(target).setSslTruststorePassword(property(camelContext, java.lang.String.class, value)); return true; case "useglobalsslcontextparameters": diff --git a/components/camel-kafka/src/generated/resources/org/apache/camel/component/kafka/kafka.json b/components/camel-kafka/src/generated/resources/org/apache/camel/component/kafka/kafka.json index ec08268..9b0590e 100644 --- a/components/camel-kafka/src/generated/resources/org/apache/camel/component/kafka/kafka.json +++ b/components/camel-kafka/src/generated/resources/org/apache/camel/component/kafka/kafka.json @@ -84,7 +84,7 @@ "retryBackoffMs": { "kind": "property", "displayName": "Retry Backoff Ms", "group": "producer", "label": "producer", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "secret": false, "defaultValue": "100", "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "Before each retry, the producer refreshes the metadata of relevant topics to see if a new leader has been e [...] "sendBufferBytes": { "kind": "property", "displayName": "Send Buffer Bytes", "group": "producer", "label": "producer", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "secret": false, "defaultValue": "131072", "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "Socket write buffer size" }, "serializerClass": { "kind": "property", "displayName": "Serializer Class", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "defaultValue": "org.apache.kafka.common.serialization.StringSerializer", "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The serializer class for messages." }, - "workerPool": { "kind": "property", "displayName": "Worker Pool", "group": "producer", "label": "producer", "required": false, "type": "object", "javaType": "java.util.concurrent.ExecutorService", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "To use a custom worker pool for continue routing Exchange after kafka server has acknowledge the message that was sent to [...] + "workerPool": { "kind": "property", "displayName": "Worker Pool", "group": "producer", "label": "producer", "required": false, "type": "object", "javaType": "java.util.concurrent.ExecutorService", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "To use a custom worker pool for continue routing Exchange after kafka server has acknowledge the message that was sent to [...] "workerPoolCoreSize": { "kind": "property", "displayName": "Worker Pool Core Size", "group": "producer", "label": "producer", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "secret": false, "defaultValue": "10", "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "Number of core threads for the worker pool for continue routing Exchange after kafka server has ack [...] "workerPoolMaxSize": { "kind": "property", "displayName": "Worker Pool Max Size", "group": "producer", "label": "producer", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "secret": false, "defaultValue": "20", "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "Maximum number of threads for the worker pool for continue routing Exchange after kafka server has ac [...] "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" }, @@ -110,9 +110,9 @@ "sslProtocol": { "kind": "property", "displayName": "Ssl Protocol", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "defaultValue": "TLS", "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The SSL protocol used to generate the SSLContext. Default setting is TLS, which is fine for most cases. Allow [...] "sslProvider": { "kind": "property", "displayName": "Ssl Provider", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The name of the security provider used for SSL connections. Default value is the default security provider of the JVM." }, "sslTrustmanagerAlgorithm": { "kind": "property", "displayName": "Ssl Trustmanager Algorithm", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "defaultValue": "PKIX", "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The algorithm used by trust manager factory for SSL connections. Default value is [...] + "sslTruststoreLocation": { "kind": "property", "displayName": "Ssl Truststore Location", "group": "security", "label": "producer,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The location of the trust store file." }, "sslTruststoreType": { "kind": "property", "displayName": "Ssl Truststore Type", "group": "security", "label": "common,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "defaultValue": "JKS", "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The file format of the trust store file. Default value is JKS." }, "schemaRegistryURL": { "kind": "property", "displayName": "Schema Registry URL", "group": "confluent", "label": "confluent", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "URL of the Confluent Platform schema registry servers to use. The format is host1:port1,host2:port2. This is known as schema [...] - "sslTruststoreLocation": { "kind": "property", "displayName": "Ssl Truststore Location", "group": "security", "label": "producer,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The location of the trust store file." }, "sslTruststorePassword": { "kind": "property", "displayName": "Ssl Truststore Password", "group": "security", "label": "producer,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": true, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The password for the trust store file." }, "useGlobalSslContextParameters": { "kind": "property", "displayName": "Use Global Ssl Context Parameters", "group": "security", "label": "security", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": "false", "description": "Enable usage of global SSL context parameters." } }, @@ -183,7 +183,7 @@ "retryBackoffMs": { "kind": "parameter", "displayName": "Retry Backoff Ms", "group": "producer", "label": "producer", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "secret": false, "defaultValue": "100", "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "Before each retry, the producer refreshes the metadata of relevant topics to see if a new leader has been [...] "sendBufferBytes": { "kind": "parameter", "displayName": "Send Buffer Bytes", "group": "producer", "label": "producer", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "secret": false, "defaultValue": "131072", "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "Socket write buffer size" }, "serializerClass": { "kind": "parameter", "displayName": "Serializer Class", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "defaultValue": "org.apache.kafka.common.serialization.StringSerializer", "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The serializer class for messages." }, - "workerPool": { "kind": "parameter", "displayName": "Worker Pool", "group": "producer", "label": "producer", "required": false, "type": "object", "javaType": "java.util.concurrent.ExecutorService", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "To use a custom worker pool for continue routing Exchange after kafka server has acknowledge the message that was sent t [...] + "workerPool": { "kind": "parameter", "displayName": "Worker Pool", "group": "producer", "label": "producer", "required": false, "type": "object", "javaType": "java.util.concurrent.ExecutorService", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "To use a custom worker pool for continue routing Exchange after kafka server has acknowledge the message that was sent t [...] "workerPoolCoreSize": { "kind": "parameter", "displayName": "Worker Pool Core Size", "group": "producer", "label": "producer", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "secret": false, "defaultValue": "10", "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "Number of core threads for the worker pool for continue routing Exchange after kafka server has ac [...] "workerPoolMaxSize": { "kind": "parameter", "displayName": "Worker Pool Max Size", "group": "producer", "label": "producer", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "secret": false, "defaultValue": "20", "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "Maximum number of threads for the worker pool for continue routing Exchange after kafka server has a [...] "basicPropertyBinding": { "kind": "parameter", "displayName": "Basic Property Binding", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Whether the endpoint should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities" }, diff --git a/components/camel-kafka/src/main/docs/kafka-component.adoc b/components/camel-kafka/src/main/docs/kafka-component.adoc index 2cfa9ac..b8b38c8 100644 --- a/components/camel-kafka/src/main/docs/kafka-component.adoc +++ b/components/camel-kafka/src/main/docs/kafka-component.adoc @@ -108,7 +108,7 @@ The Kafka component supports 96 options, which are listed below. | *retryBackoffMs* (producer) | Before each retry, the producer refreshes the metadata of relevant topics to see if a new leader has been elected. Since leader election takes a bit of time, this property specifies the amount of time that the producer waits before refreshing the metadata. | 100 | Integer | *sendBufferBytes* (producer) | Socket write buffer size | 131072 | Integer | *serializerClass* (producer) | The serializer class for messages. | org.apache.kafka.common.serialization.StringSerializer | String -| *workerPool* (producer) | To use a custom worker pool for continue routing Exchange after kafka server has acknowledge the message that was sent to it from KafkaProducer using asynchronous non-blocking processing. | | ExecutorService +| *workerPool* (producer) | To use a custom worker pool for continue routing Exchange after kafka server has acknowledge the message that was sent to it from KafkaProducer using asynchronous non-blocking processing. If using this option then you must handle the lifecycle of the thread pool to shut the pool down when no longer needed. | | ExecutorService | *workerPoolCoreSize* (producer) | Number of core threads for the worker pool for continue routing Exchange after kafka server has acknowledge the message that was sent to it from KafkaProducer using asynchronous non-blocking processing. | 10 | Integer | *workerPoolMaxSize* (producer) | Maximum number of threads for the worker pool for continue routing Exchange after kafka server has acknowledge the message that was sent to it from KafkaProducer using asynchronous non-blocking processing. | 20 | Integer | *basicPropertyBinding* (advanced) | Whether the component should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities | false | boolean @@ -134,9 +134,9 @@ The Kafka component supports 96 options, which are listed below. | *sslProtocol* (security) | The SSL protocol used to generate the SSLContext. Default setting is TLS, which is fine for most cases. Allowed values in recent JVMs are TLS, TLSv1.1 and TLSv1.2. SSL, SSLv2 and SSLv3 may be supported in older JVMs, but their usage is discouraged due to known security vulnerabilities. | TLS | String | *sslProvider* (security) | The name of the security provider used for SSL connections. Default value is the default security provider of the JVM. | | String | *sslTrustmanagerAlgorithm* (security) | The algorithm used by trust manager factory for SSL connections. Default value is the trust manager factory algorithm configured for the Java Virtual Machine. | PKIX | String +| *sslTruststoreLocation* (security) | The location of the trust store file. | | String | *sslTruststoreType* (security) | The file format of the trust store file. Default value is JKS. | JKS | String | *schemaRegistryURL* (confluent) | URL of the Confluent Platform schema registry servers to use. The format is host1:port1,host2:port2. This is known as schema.registry.url in the Confluent Platform documentation. This option is only available in the Confluent Platform (not standard Apache Kafka) | | String -| *sslTruststoreLocation* (security) | The location of the trust store file. | | String | *sslTruststorePassword* (security) | The password for the trust store file. | | String | *useGlobalSslContextParameters* (security) | Enable usage of global SSL context parameters. | false | boolean |=== @@ -234,7 +234,7 @@ with the following path and query parameters: | *retryBackoffMs* (producer) | Before each retry, the producer refreshes the metadata of relevant topics to see if a new leader has been elected. Since leader election takes a bit of time, this property specifies the amount of time that the producer waits before refreshing the metadata. | 100 | Integer | *sendBufferBytes* (producer) | Socket write buffer size | 131072 | Integer | *serializerClass* (producer) | The serializer class for messages. | org.apache.kafka.common.serialization.StringSerializer | String -| *workerPool* (producer) | To use a custom worker pool for continue routing Exchange after kafka server has acknowledge the message that was sent to it from KafkaProducer using asynchronous non-blocking processing. | | ExecutorService +| *workerPool* (producer) | To use a custom worker pool for continue routing Exchange after kafka server has acknowledge the message that was sent to it from KafkaProducer using asynchronous non-blocking processing. If using this option then you must handle the lifecycle of the thread pool to shut the pool down when no longer needed. | | ExecutorService | *workerPoolCoreSize* (producer) | Number of core threads for the worker pool for continue routing Exchange after kafka server has acknowledge the message that was sent to it from KafkaProducer using asynchronous non-blocking processing. | 10 | Integer | *workerPoolMaxSize* (producer) | Maximum number of threads for the worker pool for continue routing Exchange after kafka server has acknowledge the message that was sent to it from KafkaProducer using asynchronous non-blocking processing. | 20 | Integer | *basicPropertyBinding* (advanced) | Whether the endpoint should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities | false | boolean diff --git a/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaComponent.java b/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaComponent.java index b9bc5d5..710fa20 100644 --- a/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaComponent.java +++ b/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaComponent.java @@ -33,8 +33,6 @@ public class KafkaComponent extends DefaultComponent implements SSLContextParame @Metadata private KafkaConfiguration configuration = new KafkaConfiguration(); - @Metadata(label = "advanced") - private ExecutorService workerPool; @Metadata(label = "security", defaultValue = "false") private boolean useGlobalSslContextParameters; @Metadata(label = "consumer,advanced") @@ -57,9 +55,7 @@ public class KafkaComponent extends DefaultComponent implements SSLContextParame KafkaConfiguration copy = getConfiguration().copy(); endpoint.setConfiguration(copy); - endpoint.getConfiguration().setTopic(remaining); - endpoint.getConfiguration().setWorkerPool(getWorkerPool()); setProperties(endpoint, parameters); @@ -91,21 +87,6 @@ public class KafkaComponent extends DefaultComponent implements SSLContextParame this.configuration = configuration; } - public ExecutorService getWorkerPool() { - return workerPool; - } - - /** - * To use a shared custom worker pool for continue routing {@link Exchange} - * after kafka server has acknowledge the message that was sent to it from - * {@link KafkaProducer} using asynchronous non-blocking processing. If - * using this option then you must handle the lifecycle of the thread pool - * to shut the pool down when no longer needed. - */ - public void setWorkerPool(ExecutorService workerPool) { - this.workerPool = workerPool; - } - @Override public boolean isUseGlobalSslContextParameters() { return this.useGlobalSslContextParameters; diff --git a/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaConfiguration.java b/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaConfiguration.java index 67a5c73..e96333e 100644 --- a/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaConfiguration.java +++ b/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaConfiguration.java @@ -1635,6 +1635,8 @@ public class KafkaConfiguration implements Cloneable, HeaderFilterStrategyAware * To use a custom worker pool for continue routing {@link Exchange} after * kafka server has acknowledge the message that was sent to it from * {@link KafkaProducer} using asynchronous non-blocking processing. + * If using this option then you must handle the lifecycle of the thread pool + * to shut the pool down when no longer needed. */ public void setWorkerPool(ExecutorService workerPool) { this.workerPool = workerPool; diff --git a/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Aws2KinesisComponentBuilderFactory.java b/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Aws2KinesisComponentBuilderFactory.java index 33b6a10..eb6dd92 100644 --- a/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Aws2KinesisComponentBuilderFactory.java +++ b/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Aws2KinesisComponentBuilderFactory.java @@ -62,6 +62,57 @@ public interface Aws2KinesisComponentBuilderFactory { return this; } /** + * Amazon Kinesis client to use for all requests for this endpoint. + * + * The option is a: + * <code>software.amazon.awssdk.services.kinesis.KinesisClient</code> + * type. + * + * Group: common + */ + default Aws2KinesisComponentBuilder amazonKinesisClient( + software.amazon.awssdk.services.kinesis.KinesisClient amazonKinesisClient) { + doSetProperty("amazonKinesisClient", amazonKinesisClient); + return this; + } + /** + * To define a proxy host when instantiating the Kinesis client. + * + * The option is a: <code>java.lang.String</code> type. + * + * Group: common + */ + default Aws2KinesisComponentBuilder proxyHost(java.lang.String proxyHost) { + doSetProperty("proxyHost", proxyHost); + return this; + } + /** + * To define a proxy port when instantiating the Kinesis client. + * + * The option is a: <code>java.lang.Integer</code> type. + * + * Group: common + */ + default Aws2KinesisComponentBuilder proxyPort( + java.lang.Integer proxyPort) { + doSetProperty("proxyPort", proxyPort); + return this; + } + /** + * To define a proxy protocol when instantiating the Kinesis client. + * + * The option is a: <code>software.amazon.awssdk.core.Protocol</code> + * type. + * + * Default: HTTPS + * Group: common + */ + default Aws2KinesisComponentBuilder proxyProtocol( + software.amazon.awssdk.core.Protocol proxyProtocol) { + doSetProperty("proxyProtocol", proxyProtocol); + return this; + } + /** * Amazon AWS Region. * * The option is a: <code>java.lang.String</code> type. @@ -103,6 +154,76 @@ public interface Aws2KinesisComponentBuilderFactory { return this; } /** + * Defines where in the Kinesis stream to start getting records. + * + * The option is a: + * <code>software.amazon.awssdk.services.kinesis.model.ShardIteratorType</code> type. + * + * Default: TRIM_HORIZON + * Group: consumer + */ + default Aws2KinesisComponentBuilder iteratorType( + software.amazon.awssdk.services.kinesis.model.ShardIteratorType iteratorType) { + doSetProperty("iteratorType", iteratorType); + return this; + } + /** + * Maximum number of records that will be fetched in each poll. + * + * The option is a: <code>int</code> type. + * + * Default: 1 + * Group: consumer + */ + default Aws2KinesisComponentBuilder maxResultsPerRequest( + int maxResultsPerRequest) { + doSetProperty("maxResultsPerRequest", maxResultsPerRequest); + return this; + } + /** + * The sequence number to start polling from. Required if iteratorType + * is set to AFTER_SEQUENCE_NUMBER or AT_SEQUENCE_NUMBER. + * + * The option is a: <code>java.lang.String</code> type. + * + * Group: consumer + */ + default Aws2KinesisComponentBuilder sequenceNumber( + java.lang.String sequenceNumber) { + doSetProperty("sequenceNumber", sequenceNumber); + return this; + } + /** + * Define what will be the behavior in case of shard closed. Possible + * value are ignore, silent and fail. In case of ignore a message will + * be logged and the consumer will restart from the beginning,in case of + * silent there will be no logging and the consumer will start from the + * beginning,in case of fail a ReachedClosedStateException will be + * raised. + * + * The option is a: + * <code>org.apache.camel.component.aws2.kinesis.Kinesis2ShardClosedStrategyEnum</code> type. + * + * Default: ignore + * Group: consumer + */ + default Aws2KinesisComponentBuilder shardClosed( + org.apache.camel.component.aws2.kinesis.Kinesis2ShardClosedStrategyEnum shardClosed) { + doSetProperty("shardClosed", shardClosed); + return this; + } + /** + * Defines which shardId in the Kinesis stream to get records from. + * + * The option is a: <code>java.lang.String</code> type. + * + * Group: consumer + */ + default Aws2KinesisComponentBuilder shardId(java.lang.String shardId) { + doSetProperty("shardId", shardId); + 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 @@ -161,6 +282,13 @@ public interface Aws2KinesisComponentBuilderFactory { protected Kinesis2Component buildConcreteComponent() { return new Kinesis2Component(); } + private org.apache.camel.component.aws2.kinesis.Kinesis2Configuration getOrCreateConfiguration( + org.apache.camel.component.aws2.kinesis.Kinesis2Component component) { + if (component.getConfiguration() == null) { + component.setConfiguration(new org.apache.camel.component.aws2.kinesis.Kinesis2Configuration()); + } + return component.getConfiguration(); + } @Override protected boolean setPropertyOnComponent( Component component, @@ -168,9 +296,18 @@ public interface Aws2KinesisComponentBuilderFactory { Object value) { switch (name) { case "accessKey": ((Kinesis2Component) component).setAccessKey((java.lang.String) value); return true; + case "amazonKinesisClient": getOrCreateConfiguration((Kinesis2Component) component).setAmazonKinesisClient((software.amazon.awssdk.services.kinesis.KinesisClient) value); return true; + case "proxyHost": getOrCreateConfiguration((Kinesis2Component) component).setProxyHost((java.lang.String) value); return true; + case "proxyPort": getOrCreateConfiguration((Kinesis2Component) component).setProxyPort((java.lang.Integer) value); return true; + case "proxyProtocol": getOrCreateConfiguration((Kinesis2Component) component).setProxyProtocol((software.amazon.awssdk.core.Protocol) value); return true; case "region": ((Kinesis2Component) component).setRegion((java.lang.String) value); return true; case "secretKey": ((Kinesis2Component) component).setSecretKey((java.lang.String) value); return true; case "bridgeErrorHandler": ((Kinesis2Component) component).setBridgeErrorHandler((boolean) value); return true; + case "iteratorType": getOrCreateConfiguration((Kinesis2Component) component).setIteratorType((software.amazon.awssdk.services.kinesis.model.ShardIteratorType) value); return true; + case "maxResultsPerRequest": getOrCreateConfiguration((Kinesis2Component) component).setMaxResultsPerRequest((int) value); return true; + case "sequenceNumber": getOrCreateConfiguration((Kinesis2Component) component).setSequenceNumber((java.lang.String) value); return true; + case "shardClosed": getOrCreateConfiguration((Kinesis2Component) component).setShardClosed((org.apache.camel.component.aws2.kinesis.Kinesis2ShardClosedStrategyEnum) value); return true; + case "shardId": getOrCreateConfiguration((Kinesis2Component) component).setShardId((java.lang.String) value); return true; case "lazyStartProducer": ((Kinesis2Component) component).setLazyStartProducer((boolean) value); return true; case "basicPropertyBinding": ((Kinesis2Component) component).setBasicPropertyBinding((boolean) value); return true; case "configuration": ((Kinesis2Component) component).setConfiguration((org.apache.camel.component.aws2.kinesis.Kinesis2Configuration) value); return true; diff --git a/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Aws2KinesisFirehoseComponentBuilderFactory.java b/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Aws2KinesisFirehoseComponentBuilderFactory.java index d79c64f..c87bd5b 100644 --- a/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Aws2KinesisFirehoseComponentBuilderFactory.java +++ b/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Aws2KinesisFirehoseComponentBuilderFactory.java @@ -63,6 +63,21 @@ public interface Aws2KinesisFirehoseComponentBuilderFactory { return this; } /** + * Amazon Kinesis Firehose client to use for all requests for this + * endpoint. + * + * The option is a: + * <code>software.amazon.awssdk.services.firehose.FirehoseClient</code> + * type. + * + * Group: producer + */ + default Aws2KinesisFirehoseComponentBuilder amazonKinesisFirehoseClient( + software.amazon.awssdk.services.firehose.FirehoseClient amazonKinesisFirehoseClient) { + doSetProperty("amazonKinesisFirehoseClient", amazonKinesisFirehoseClient); + 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 @@ -84,6 +99,47 @@ public interface Aws2KinesisFirehoseComponentBuilderFactory { return this; } /** + * To define a proxy host when instantiating the Kinesis Firehose + * client. + * + * The option is a: <code>java.lang.String</code> type. + * + * Group: producer + */ + default Aws2KinesisFirehoseComponentBuilder proxyHost( + java.lang.String proxyHost) { + doSetProperty("proxyHost", proxyHost); + return this; + } + /** + * To define a proxy port when instantiating the Kinesis Firehose + * client. + * + * The option is a: <code>java.lang.Integer</code> type. + * + * Group: producer + */ + default Aws2KinesisFirehoseComponentBuilder proxyPort( + java.lang.Integer proxyPort) { + doSetProperty("proxyPort", proxyPort); + return this; + } + /** + * To define a proxy protocol when instantiating the Kinesis Firehose + * client. + * + * The option is a: <code>software.amazon.awssdk.core.Protocol</code> + * type. + * + * Default: HTTPS + * Group: producer + */ + default Aws2KinesisFirehoseComponentBuilder proxyProtocol( + software.amazon.awssdk.core.Protocol proxyProtocol) { + doSetProperty("proxyProtocol", proxyProtocol); + return this; + } + /** * Amazon AWS Region. * * The option is a: <code>java.lang.String</code> type. @@ -145,6 +201,13 @@ public interface Aws2KinesisFirehoseComponentBuilderFactory { protected KinesisFirehose2Component buildConcreteComponent() { return new KinesisFirehose2Component(); } + private org.apache.camel.component.aws2.firehose.KinesisFirehose2Configuration getOrCreateConfiguration( + org.apache.camel.component.aws2.firehose.KinesisFirehose2Component component) { + if (component.getConfiguration() == null) { + component.setConfiguration(new org.apache.camel.component.aws2.firehose.KinesisFirehose2Configuration()); + } + return component.getConfiguration(); + } @Override protected boolean setPropertyOnComponent( Component component, @@ -152,7 +215,11 @@ public interface Aws2KinesisFirehoseComponentBuilderFactory { Object value) { switch (name) { case "accessKey": ((KinesisFirehose2Component) component).setAccessKey((java.lang.String) value); return true; + case "amazonKinesisFirehoseClient": getOrCreateConfiguration((KinesisFirehose2Component) component).setAmazonKinesisFirehoseClient((software.amazon.awssdk.services.firehose.FirehoseClient) value); return true; case "lazyStartProducer": ((KinesisFirehose2Component) component).setLazyStartProducer((boolean) value); return true; + case "proxyHost": getOrCreateConfiguration((KinesisFirehose2Component) component).setProxyHost((java.lang.String) value); return true; + case "proxyPort": getOrCreateConfiguration((KinesisFirehose2Component) component).setProxyPort((java.lang.Integer) value); return true; + case "proxyProtocol": getOrCreateConfiguration((KinesisFirehose2Component) component).setProxyProtocol((software.amazon.awssdk.core.Protocol) value); return true; case "region": ((KinesisFirehose2Component) component).setRegion((java.lang.String) value); return true; case "secretKey": ((KinesisFirehose2Component) component).setSecretKey((java.lang.String) value); return true; case "basicPropertyBinding": ((KinesisFirehose2Component) component).setBasicPropertyBinding((boolean) value); return true; diff --git a/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/KafkaComponentBuilderFactory.java b/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/KafkaComponentBuilderFactory.java index 6aeeda3..d8d0897 100644 --- a/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/KafkaComponentBuilderFactory.java +++ b/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/KafkaComponentBuilderFactory.java @@ -1087,7 +1087,9 @@ public interface KafkaComponentBuilderFactory { /** * To use a custom worker pool for continue routing Exchange after kafka * server has acknowledge the message that was sent to it from - * KafkaProducer using asynchronous non-blocking processing. + * KafkaProducer using asynchronous non-blocking processing. If using + * this option then you must handle the lifecycle of the thread pool to + * shut the pool down when no longer needed. * * The option is a: <code>java.util.concurrent.ExecutorService</code> * type. @@ -1460,6 +1462,18 @@ public interface KafkaComponentBuilderFactory { return this; } /** + * The location of the trust store file. + * + * The option is a: <code>java.lang.String</code> type. + * + * Group: security + */ + default KafkaComponentBuilder sslTruststoreLocation( + java.lang.String sslTruststoreLocation) { + doSetProperty("sslTruststoreLocation", sslTruststoreLocation); + return this; + } + /** * The file format of the trust store file. Default value is JKS. * * The option is a: <code>java.lang.String</code> type. @@ -1489,18 +1503,6 @@ public interface KafkaComponentBuilderFactory { return this; } /** - * The location of the trust store file. - * - * The option is a: <code>java.lang.String</code> type. - * - * Group: security - */ - default KafkaComponentBuilder sslTruststoreLocation( - java.lang.String sslTruststoreLocation) { - doSetProperty("sslTruststoreLocation", sslTruststoreLocation); - return this; - } - /** * The password for the trust store file. * * The option is a: <code>java.lang.String</code> type. @@ -1640,9 +1642,9 @@ public interface KafkaComponentBuilderFactory { case "sslProtocol": getOrCreateConfiguration((KafkaComponent) component).setSslProtocol((java.lang.String) value); return true; case "sslProvider": getOrCreateConfiguration((KafkaComponent) component).setSslProvider((java.lang.String) value); return true; case "sslTrustmanagerAlgorithm": getOrCreateConfiguration((KafkaComponent) component).setSslTrustmanagerAlgorithm((java.lang.String) value); return true; + case "sslTruststoreLocation": getOrCreateConfiguration((KafkaComponent) component).setSslTruststoreLocation((java.lang.String) value); return true; case "sslTruststoreType": getOrCreateConfiguration((KafkaComponent) component).setSslTruststoreType((java.lang.String) value); return true; case "schemaRegistryURL": getOrCreateConfiguration((KafkaComponent) component).setSchemaRegistryURL((java.lang.String) value); return true; - case "sslTruststoreLocation": getOrCreateConfiguration((KafkaComponent) component).setSslTruststoreLocation((java.lang.String) value); return true; case "sslTruststorePassword": getOrCreateConfiguration((KafkaComponent) component).setSslTruststorePassword((java.lang.String) value); return true; case "useGlobalSslContextParameters": ((KafkaComponent) component).setUseGlobalSslContextParameters((boolean) value); return true; default: return false; diff --git a/docs/components/modules/ROOT/pages/aws2-kinesis-component.adoc b/docs/components/modules/ROOT/pages/aws2-kinesis-component.adoc index 75d8ce9..fb3c6c7 100644 --- a/docs/components/modules/ROOT/pages/aws2-kinesis-component.adoc +++ b/docs/components/modules/ROOT/pages/aws2-kinesis-component.adoc @@ -37,7 +37,7 @@ The stream needs to be created prior to it being used. + // component options: START -The AWS 2 Kinesis component supports 7 options, which are listed below. +The AWS 2 Kinesis component supports 16 options, which are listed below. @@ -45,9 +45,18 @@ The AWS 2 Kinesis component supports 7 options, which are listed below. |=== | Name | Description | Default | Type | *accessKey* (common) | Amazon AWS Access Key | | String +| *amazonKinesisClient* (common) | Amazon Kinesis client to use for all requests for this endpoint | | KinesisClient +| *proxyHost* (common) | To define a proxy host when instantiating the Kinesis client | | String +| *proxyPort* (common) | To define a proxy port when instantiating the Kinesis client | | Integer +| *proxyProtocol* (common) | To define a proxy protocol when instantiating the Kinesis client. The value can be one of: HTTP, HTTPS | HTTPS | Protocol | *region* (common) | Amazon AWS Region | | String | *secretKey* (common) | Amazon AWS Secret Key | | String | *bridgeErrorHandler* (consumer) | 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. | false | boolean +| *iteratorType* (consumer) | Defines where in the Kinesis stream to start getting records. The value can be one of: AT_SEQUENCE_NUMBER, AFTER_SEQUENCE_NUMBER, TRIM_HORIZON, LATEST, AT_TIMESTAMP, null | TRIM_HORIZON | ShardIteratorType +| *maxResultsPerRequest* (consumer) | Maximum number of records that will be fetched in each poll | 1 | int +| *sequenceNumber* (consumer) | The sequence number to start polling from. Required if iteratorType is set to AFTER_SEQUENCE_NUMBER or AT_SEQUENCE_NUMBER | | String +| *shardClosed* (consumer) | Define what will be the behavior in case of shard closed. Possible value are ignore, silent and fail. In case of ignore a message will be logged and the consumer will restart from the beginning,in case of silent there will be no logging and the consumer will start from the beginning,in case of fail a ReachedClosedStateException will be raised. The value can be one of: ignore, fail, silent | ignore | Kinesis2ShardClosedStrategyEnum +| *shardId* (consumer) | Defines which shardId in the Kinesis stream to get records from | | String | *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 [...] | *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 | | Kinesis2Configuration diff --git a/docs/components/modules/ROOT/pages/aws2-kinesis-firehose-component.adoc b/docs/components/modules/ROOT/pages/aws2-kinesis-firehose-component.adoc index 7e62dd7..06d7183 100644 --- a/docs/components/modules/ROOT/pages/aws2-kinesis-firehose-component.adoc +++ b/docs/components/modules/ROOT/pages/aws2-kinesis-firehose-component.adoc @@ -36,7 +36,7 @@ The stream needs to be created prior to it being used. + // component options: START -The AWS 2 Kinesis Firehose component supports 6 options, which are listed below. +The AWS 2 Kinesis Firehose component supports 10 options, which are listed below. @@ -44,7 +44,11 @@ The AWS 2 Kinesis Firehose component supports 6 options, which are listed below. |=== | Name | Description | Default | Type | *accessKey* (producer) | Amazon AWS Access Key | | String +| *amazonKinesisFirehoseClient* (producer) | Amazon Kinesis Firehose client to use for all requests for this endpoint | | FirehoseClient | *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 [...] +| *proxyHost* (producer) | To define a proxy host when instantiating the Kinesis Firehose client | | String +| *proxyPort* (producer) | To define a proxy port when instantiating the Kinesis Firehose client | | Integer +| *proxyProtocol* (producer) | To define a proxy protocol when instantiating the Kinesis Firehose client. The value can be one of: HTTP, HTTPS | HTTPS | Protocol | *region* (producer) | Amazon AWS Region | | 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 diff --git a/docs/components/modules/ROOT/pages/kafka-component.adoc b/docs/components/modules/ROOT/pages/kafka-component.adoc index 0f5b118..98ef316 100644 --- a/docs/components/modules/ROOT/pages/kafka-component.adoc +++ b/docs/components/modules/ROOT/pages/kafka-component.adoc @@ -109,7 +109,7 @@ The Kafka component supports 96 options, which are listed below. | *retryBackoffMs* (producer) | Before each retry, the producer refreshes the metadata of relevant topics to see if a new leader has been elected. Since leader election takes a bit of time, this property specifies the amount of time that the producer waits before refreshing the metadata. | 100 | Integer | *sendBufferBytes* (producer) | Socket write buffer size | 131072 | Integer | *serializerClass* (producer) | The serializer class for messages. | org.apache.kafka.common.serialization.StringSerializer | String -| *workerPool* (producer) | To use a custom worker pool for continue routing Exchange after kafka server has acknowledge the message that was sent to it from KafkaProducer using asynchronous non-blocking processing. | | ExecutorService +| *workerPool* (producer) | To use a custom worker pool for continue routing Exchange after kafka server has acknowledge the message that was sent to it from KafkaProducer using asynchronous non-blocking processing. If using this option then you must handle the lifecycle of the thread pool to shut the pool down when no longer needed. | | ExecutorService | *workerPoolCoreSize* (producer) | Number of core threads for the worker pool for continue routing Exchange after kafka server has acknowledge the message that was sent to it from KafkaProducer using asynchronous non-blocking processing. | 10 | Integer | *workerPoolMaxSize* (producer) | Maximum number of threads for the worker pool for continue routing Exchange after kafka server has acknowledge the message that was sent to it from KafkaProducer using asynchronous non-blocking processing. | 20 | Integer | *basicPropertyBinding* (advanced) | Whether the component should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities | false | boolean @@ -135,9 +135,9 @@ The Kafka component supports 96 options, which are listed below. | *sslProtocol* (security) | The SSL protocol used to generate the SSLContext. Default setting is TLS, which is fine for most cases. Allowed values in recent JVMs are TLS, TLSv1.1 and TLSv1.2. SSL, SSLv2 and SSLv3 may be supported in older JVMs, but their usage is discouraged due to known security vulnerabilities. | TLS | String | *sslProvider* (security) | The name of the security provider used for SSL connections. Default value is the default security provider of the JVM. | | String | *sslTrustmanagerAlgorithm* (security) | The algorithm used by trust manager factory for SSL connections. Default value is the trust manager factory algorithm configured for the Java Virtual Machine. | PKIX | String +| *sslTruststoreLocation* (security) | The location of the trust store file. | | String | *sslTruststoreType* (security) | The file format of the trust store file. Default value is JKS. | JKS | String | *schemaRegistryURL* (confluent) | URL of the Confluent Platform schema registry servers to use. The format is host1:port1,host2:port2. This is known as schema.registry.url in the Confluent Platform documentation. This option is only available in the Confluent Platform (not standard Apache Kafka) | | String -| *sslTruststoreLocation* (security) | The location of the trust store file. | | String | *sslTruststorePassword* (security) | The password for the trust store file. | | String | *useGlobalSslContextParameters* (security) | Enable usage of global SSL context parameters. | false | boolean |=== @@ -235,7 +235,7 @@ with the following path and query parameters: | *retryBackoffMs* (producer) | Before each retry, the producer refreshes the metadata of relevant topics to see if a new leader has been elected. Since leader election takes a bit of time, this property specifies the amount of time that the producer waits before refreshing the metadata. | 100 | Integer | *sendBufferBytes* (producer) | Socket write buffer size | 131072 | Integer | *serializerClass* (producer) | The serializer class for messages. | org.apache.kafka.common.serialization.StringSerializer | String -| *workerPool* (producer) | To use a custom worker pool for continue routing Exchange after kafka server has acknowledge the message that was sent to it from KafkaProducer using asynchronous non-blocking processing. | | ExecutorService +| *workerPool* (producer) | To use a custom worker pool for continue routing Exchange after kafka server has acknowledge the message that was sent to it from KafkaProducer using asynchronous non-blocking processing. If using this option then you must handle the lifecycle of the thread pool to shut the pool down when no longer needed. | | ExecutorService | *workerPoolCoreSize* (producer) | Number of core threads for the worker pool for continue routing Exchange after kafka server has acknowledge the message that was sent to it from KafkaProducer using asynchronous non-blocking processing. | 10 | Integer | *workerPoolMaxSize* (producer) | Maximum number of threads for the worker pool for continue routing Exchange after kafka server has acknowledge the message that was sent to it from KafkaProducer using asynchronous non-blocking processing. | 20 | Integer | *basicPropertyBinding* (advanced) | Whether the endpoint should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities | false | boolean
