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 2017/01/19 09:39:16 UTC

[1/2] camel git commit: CAMEL-10723: Improved camel-aws kinesis documentation

Repository: camel
Updated Branches:
  refs/heads/camel-2.18.x 550e1f3ef -> 57e8d6d49


CAMEL-10723: Improved camel-aws kinesis documentation


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/1c1238ec
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/1c1238ec
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/1c1238ec

Branch: refs/heads/camel-2.18.x
Commit: 1c1238eca1dd6b71dfb550762142945bed19b25a
Parents: 550e1f3
Author: Pontus Ullgren <po...@redpill-linpro.com>
Authored: Wed Jan 18 15:02:28 2017 +0100
Committer: Andrea Cosentino <an...@gmail.com>
Committed: Thu Jan 19 10:38:12 2017 +0100

----------------------------------------------------------------------
 .../src/main/docs/aws-kinesis-component.adoc      | 18 ++++++++++++------
 .../component/aws/kinesis/KinesisEndpoint.java    |  4 ++--
 2 files changed, 14 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/1c1238ec/components/camel-aws/src/main/docs/aws-kinesis-component.adoc
----------------------------------------------------------------------
diff --git a/components/camel-aws/src/main/docs/aws-kinesis-component.adoc b/components/camel-aws/src/main/docs/aws-kinesis-component.adoc
index 0d1590f..5484c49 100644
--- a/components/camel-aws/src/main/docs/aws-kinesis-component.adoc
+++ b/components/camel-aws/src/main/docs/aws-kinesis-component.adoc
@@ -4,7 +4,7 @@ Kinesis Component
 
 *Available as of Camel 2.17*
 
-The Kinesis component supports receiving messages from Amazon Kinesis
+The Kinesis component supports receiving messages from and sending messages to Amazon Kinesis
 service.
 
 Prerequisites
@@ -122,7 +122,7 @@ 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 AmazonDynamoDBStreamsClient and
+You will need to create an instance of AmazonKinesisClient and
 bind it to the registry
 
 [source,java]
@@ -132,15 +132,21 @@ clientConfiguration.setProxyHost("http://myProxyHost");
 clientConfiguration.setProxyPort(8080);
 
 Region region = Region.getRegion(Regions.fromName(region));
-region.createClient(AmazonDynamoDBStreamsClient.class, null, clientConfiguration);
+region.createClient(AmazonKinesisClient.class, null, clientConfiguration);
 // the 'null' here is the AWSCredentialsProvider which defaults to an instance of DefaultAWSCredentialsProviderChain
 
 registry.bind("kinesisClient", client);
 --------------------------------------------------------------------------------------------------------------------
 
-[[AWS-KINESIS-ProvidingAWSCredentials]]
-Providing AWS Credentials
-+++++++++++++++++++++++++
+You then have to reference the AmazonKinesisClient in the `amazonKinesisClient` URI option.
+
+[source,java]
+--------------------------------------------------------------------------------------------------------------------
+from("aws-kinesis://mykinesisstream?amazonKinesisClient=#kinesisClient")
+  .to("log:out?showAll=true");
+--------------------------------------------------------------------------------------------------------------------
+
+#### Providing AWS Credentials
 
 It is recommended that the credentials are obtained by using the
 http://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/auth/DefaultAWSCredentialsProviderChain.html[DefaultAWSCredentialsProviderChain]

http://git-wip-us.apache.org/repos/asf/camel/blob/1c1238ec/components/camel-aws/src/main/java/org/apache/camel/component/aws/kinesis/KinesisEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-aws/src/main/java/org/apache/camel/component/aws/kinesis/KinesisEndpoint.java b/components/camel-aws/src/main/java/org/apache/camel/component/aws/kinesis/KinesisEndpoint.java
index 833a230..2568c98 100644
--- a/components/camel-aws/src/main/java/org/apache/camel/component/aws/kinesis/KinesisEndpoint.java
+++ b/components/camel-aws/src/main/java/org/apache/camel/component/aws/kinesis/KinesisEndpoint.java
@@ -43,11 +43,11 @@ public class KinesisEndpoint extends ScheduledPollEndpoint {
     private AmazonKinesis amazonKinesisClient;
     @UriParam(label = "consumer", description = "Maximum number of records that will be fetched in each poll", defaultValue = "1")
     private int maxResultsPerRequest = 1;
-    @UriParam(label = "consumer", description = "Defines where in the Kinesis stream to start getting records")
+    @UriParam(label = "consumer", description = "Defines where in the Kinesis stream to start getting records", defaultValue = "TRIM_HORIZON")
     private ShardIteratorType iteratorType = ShardIteratorType.TRIM_HORIZON;
     @UriParam(label = "consumer", description = "Defines which shardId in the Kinesis stream to get records from")
     private String shardId = "";
-    @UriParam(label = "consumer", description = "The sequence number to start polling from")
+    @UriParam(label = "consumer", description = "The sequence number to start polling from. Required if iteratorType is set to AFTER_SEQUENCE_NUMBER or AT_SEQUENCE_NUMBER")
     private String sequenceNumber = "";
 
     public KinesisEndpoint(String uri, String streamName, KinesisComponent component) {


[2/2] camel git commit: Regen docs

Posted by ac...@apache.org.
Regen docs


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/57e8d6d4
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/57e8d6d4
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/57e8d6d4

Branch: refs/heads/camel-2.18.x
Commit: 57e8d6d4919a7256cea735c27ac76e8286bec61f
Parents: 1c1238e
Author: Andrea Cosentino <an...@gmail.com>
Authored: Thu Jan 19 10:37:43 2017 +0100
Committer: Andrea Cosentino <an...@gmail.com>
Committed: Thu Jan 19 10:38:51 2017 +0100

----------------------------------------------------------------------
 components/camel-aws/src/main/docs/aws-kinesis-component.adoc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/57e8d6d4/components/camel-aws/src/main/docs/aws-kinesis-component.adoc
----------------------------------------------------------------------
diff --git a/components/camel-aws/src/main/docs/aws-kinesis-component.adoc b/components/camel-aws/src/main/docs/aws-kinesis-component.adoc
index 5484c49..64eb3ee 100644
--- a/components/camel-aws/src/main/docs/aws-kinesis-component.adoc
+++ b/components/camel-aws/src/main/docs/aws-kinesis-component.adoc
@@ -51,10 +51,10 @@ The AWS Kinesis component supports 25 endpoint options which are listed below:
 | streamName | common |  | String | *Required* Name of the stream
 | amazonKinesisClient | common |  | AmazonKinesis | *Required* Amazon Kinesis client to use for all requests for this endpoint
 | bridgeErrorHandler | consumer | false | boolean | 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/ERROR level and ignored.
-| iteratorType | consumer |  | ShardIteratorType | Defines where in the Kinesis stream to start getting records
+| iteratorType | consumer | TRIM_HORIZON | ShardIteratorType | Defines where in the Kinesis stream to start getting records
 | maxResultsPerRequest | consumer | 1 | int | Maximum number of records that will be fetched in each poll
 | sendEmptyMessageWhenIdle | consumer | false | boolean | If the polling consumer did not poll any files you can enable this option to send an empty message (no body) instead.
-| sequenceNumber | consumer |  | String | The sequence number to start polling from
+| sequenceNumber | consumer |  | String | The sequence number to start polling from. Required if iteratorType is set to AFTER_SEQUENCE_NUMBER or AT_SEQUENCE_NUMBER
 | shardId | consumer |  | String | Defines which shardId in the Kinesis stream to get records from
 | exceptionHandler | consumer (advanced) |  | ExceptionHandler | To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this options is not in use. By default the consumer will deal with exceptions that will be logged at WARN/ERROR level and ignored.
 | exchangePattern | consumer (advanced) |  | ExchangePattern | Sets the exchange pattern when the consumer creates an exchange.