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 221809ae40cc54413fb7b9fa2bab1b32e88f2567 Author: Andrea Cosentino <[email protected]> AuthorDate: Thu Feb 27 16:09:12 2020 +0100 CAMEL-14520 - Create an AWS-Kinesis component based on SDK v2, added docs --- ...-component.adoc => aws2-kinesis-component.adoc} | 36 ++++++---------------- ...t.adoc => aws2-kinesis-firehose-component.adoc} | 33 +++++--------------- 2 files changed, 17 insertions(+), 52 deletions(-) diff --git a/components/camel-aws2-kinesis/src/main/docs/aws-kinesis-component.adoc b/components/camel-aws2-kinesis/src/main/docs/aws2-kinesis-component.adoc similarity index 91% rename from components/camel-aws2-kinesis/src/main/docs/aws-kinesis-component.adoc rename to components/camel-aws2-kinesis/src/main/docs/aws2-kinesis-component.adoc index b4b246a..c673f33 100644 --- a/components/camel-aws2-kinesis/src/main/docs/aws-kinesis-component.adoc +++ b/components/camel-aws2-kinesis/src/main/docs/aws2-kinesis-component.adoc @@ -1,7 +1,5 @@ -[[aws-kinesis-component]] -= AWS Kinesis Component - -*Since Camel 2.17* +[[aws2-kinesis-component]] += AWS2 Kinesis Component // HEADER START *Both producer and consumer is supported* @@ -20,7 +18,7 @@ at https://aws.amazon.com/kinesis/[AWS Kinesis] [source,java] ----------------------------------- -aws-kinesis://stream-name[?options] +aws2-kinesis://stream-name[?options] ----------------------------------- The stream needs to be created prior to it being used. + @@ -124,7 +122,7 @@ with the following path and query parameters: Required Kinesis component options -You have to provide the amazonKinesisClient in the +You have to provide the KinesisClient in the Registry with proxies and relevant credentials configured. @@ -154,27 +152,11 @@ size is not defined by the API. If it is to be used as a numerical type then use === AmazonKinesis configuration -You will need to create an instance of AmazonKinesisClient and -bind it to the registry - -[source,java] --------------------------------------------------------------------------------------------------------------------- -ClientConfiguration clientConfiguration = new ClientConfiguration(); -clientConfiguration.setProxyHost("http://myProxyHost"); -clientConfiguration.setProxyPort(8080); - -Region region = Region.getRegion(Regions.fromName(region)); -region.createClient(AmazonKinesisClient.class, null, clientConfiguration); -// the 'null' here is the AWSCredentialsProvider which defaults to an instance of DefaultAWSCredentialsProviderChain - -registry.bind("kinesisClient", client); --------------------------------------------------------------------------------------------------------------------- - -You then have to reference the AmazonKinesisClient in the `amazonKinesisClient` URI option. +You then have to reference the KinesisClient in the `amazonKinesisClient` URI option. [source,java] -------------------------------------------------------------------------------------------------------------------- -from("aws-kinesis://mykinesisstream?amazonKinesisClient=#kinesisClient") +from("aws2-kinesis://mykinesisstream?amazonKinesisClient=#kinesisClient") .to("log:out?showAll=true"); -------------------------------------------------------------------------------------------------------------------- @@ -213,9 +195,9 @@ http://docs.aws.amazon.com/kinesis/latest/APIReference/API_PutRecord.html#API_Pu |======================================================================= -== Automatic detection of AmazonKinesis client in registry +== Automatic detection of KinesisClient client in registry -The component is capable of detecting the presence of an AmazonKinesis bean into the registry. +The component is capable of detecting the presence of an KinesisClient bean into the registry. If it's the only instance of that type it will be used as client and you won't have to define it as uri parameter. This may be really useful for smarter configuration of the endpoint. @@ -229,7 +211,7 @@ Maven users will need to add the following dependency to their pom.xml. --------------------------------------- <dependency> <groupId>org.apache.camel</groupId> - <artifactId>camel-aws-kinesis</artifactId> + <artifactId>camel-aws2-kinesis</artifactId> <version>${camel-version}</version> </dependency> --------------------------------------- diff --git a/components/camel-aws2-kinesis/src/main/docs/aws-kinesis-firehose-component.adoc b/components/camel-aws2-kinesis/src/main/docs/aws2-kinesis-firehose-component.adoc similarity index 82% rename from components/camel-aws2-kinesis/src/main/docs/aws-kinesis-firehose-component.adoc rename to components/camel-aws2-kinesis/src/main/docs/aws2-kinesis-firehose-component.adoc index 1e48f96..14e0554 100644 --- a/components/camel-aws2-kinesis/src/main/docs/aws-kinesis-firehose-component.adoc +++ b/components/camel-aws2-kinesis/src/main/docs/aws2-kinesis-firehose-component.adoc @@ -1,7 +1,5 @@ -[[aws-kinesis-firehose-component]] -= AWS Kinesis Firehose Component - -*Since Camel 2.19* +[[aws2-kinesis-firehose-component]] += AWS2 Kinesis Firehose Component // HEADER START *Only producer is supported* @@ -19,7 +17,7 @@ at https://aws.amazon.com/kinesis/firehose/[AWS Kinesis Firehose] [source,java] ----------------------------------- -aws-kinesis-firehose://delivery-stream-name[?options] +aws2-kinesis-firehose://delivery-stream-name[?options] ----------------------------------- The stream needs to be created prior to it being used. + @@ -98,7 +96,7 @@ with the following path and query parameters: Required Kinesis Firehose component options -You have to provide the amazonKinesisClient in the +You have to provide the FirehoseClient in the Registry with proxies and relevant credentials configured. @@ -107,27 +105,12 @@ configured. === Amazon Kinesis Firehose configuration -You will need to create an instance of AmazonKinesisClient and -bind it to the registry - -[source,java] --------------------------------------------------------------------------------------------------------------------- -ClientConfiguration clientConfiguration = new ClientConfiguration(); -clientConfiguration.setProxyHost("http://myProxyHost"); -clientConfiguration.setProxyPort(8080); - -Region region = Region.getRegion(Regions.fromName(region)); -region.createClient(AmazonKinesisClient.class, null, clientConfiguration); -// the 'null' here is the AWSCredentialsProvider which defaults to an instance of DefaultAWSCredentialsProviderChain - -registry.bind("kinesisFirehoseClient", client); --------------------------------------------------------------------------------------------------------------------- -You then have to reference the AmazonKinesisFirehoseClient in the `amazonKinesisFirehoseClient` URI option. +You then have to reference the FirehoseClient in the `amazonKinesisFirehoseClient` URI option. [source,java] -------------------------------------------------------------------------------------------------------------------- -from("aws-kinesis-firehose://mykinesisdeliverystream?amazonKinesisFirehoseClient=#kinesisClient") +from("aws2-kinesis-firehose://mykinesisdeliverystream?amazonKinesisFirehoseClient=#kinesisClient") .to("log:out?showAll=true"); -------------------------------------------------------------------------------------------------------------------- @@ -154,7 +137,7 @@ http://docs.aws.amazon.com/firehose/latest/APIReference/API_PutRecord.html#API_P == Automatic detection of AmazonKinesisFirehose client in registry -The component is capable of detecting the presence of an AmazonKinesisFirehose bean into the registry. +The component is capable of detecting the presence of an FirehoseClient bean into the registry. If it's the only instance of that type it will be used as client and you won't have to define it as uri parameter. This may be really useful for smarter configuration of the endpoint. @@ -168,7 +151,7 @@ Maven users will need to add the following dependency to their pom.xml. --------------------------------------- <dependency> <groupId>org.apache.camel</groupId> - <artifactId>camel-aws-kinesis</artifactId> + <artifactId>camel-aws2-kinesis</artifactId> <version>${camel-version}</version> </dependency> ---------------------------------------
