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/08/23 13:25:09 UTC

[1/2] camel git commit: CAMEL-11697 - S3 Consumer: If maxMessagesPerPoll is greater than 50 consumer fails to poll objects from bucket

Repository: camel
Updated Branches:
  refs/heads/master 6e936bb7b -> 94a10c42e


CAMEL-11697 - S3 Consumer: If maxMessagesPerPoll is greater than 50 consumer fails to poll objects from bucket


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

Branch: refs/heads/master
Commit: 58bfe20014f6dd46783f963c4e7674fe7ab7fd59
Parents: 6e936bb
Author: Andrea Cosentino <an...@gmail.com>
Authored: Wed Aug 23 15:22:23 2017 +0200
Committer: Andrea Cosentino <an...@gmail.com>
Committed: Wed Aug 23 15:22:23 2017 +0200

----------------------------------------------------------------------
 .../camel/component/aws/s3/S3Configuration.java      | 15 +++++++++++++--
 .../apache/camel/component/aws/s3/S3Endpoint.java    |  5 +++++
 2 files changed, 18 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/58bfe200/components/camel-aws/src/main/java/org/apache/camel/component/aws/s3/S3Configuration.java
----------------------------------------------------------------------
diff --git a/components/camel-aws/src/main/java/org/apache/camel/component/aws/s3/S3Configuration.java b/components/camel-aws/src/main/java/org/apache/camel/component/aws/s3/S3Configuration.java
index 03f17b1..7cf7fb3 100644
--- a/components/camel-aws/src/main/java/org/apache/camel/component/aws/s3/S3Configuration.java
+++ b/components/camel-aws/src/main/java/org/apache/camel/component/aws/s3/S3Configuration.java
@@ -66,6 +66,8 @@ public class S3Configuration implements Cloneable {
     private S3Operations operation;
     @UriParam(label = "consumer", defaultValue = "true")
     private boolean autocloseBody = true;
+    @UriParam(label = "consumer", defaultValue = "50")
+    private int maxConnections = 50;
 
     public long getPartSize() {
         return partSize;
@@ -311,9 +313,18 @@ public class S3Configuration implements Cloneable {
         this.autocloseBody = autocloseBody;
     }
 
+    public int getMaxConnections() {
+        return maxConnections;
+    }
+
+    /**
+     * Set the maxConnections parameter in the S3 client configuration
+     */
+    public void setMaxConnections(int maxConnections) {
+        this.maxConnections = maxConnections;
+    }
+
     boolean hasProxyConfiguration() {
         return ObjectHelper.isNotEmpty(getProxyHost()) && ObjectHelper.isNotEmpty(getProxyPort());
     }
-    
-    
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/58bfe200/components/camel-aws/src/main/java/org/apache/camel/component/aws/s3/S3Endpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-aws/src/main/java/org/apache/camel/component/aws/s3/S3Endpoint.java b/components/camel-aws/src/main/java/org/apache/camel/component/aws/s3/S3Endpoint.java
index e338527..16e74bd 100644
--- a/components/camel-aws/src/main/java/org/apache/camel/component/aws/s3/S3Endpoint.java
+++ b/components/camel-aws/src/main/java/org/apache/camel/component/aws/s3/S3Endpoint.java
@@ -240,6 +240,11 @@ public class S3Endpoint extends ScheduledPollEndpoint {
             clientConfiguration = new ClientConfiguration();
             clientConfiguration.setProxyHost(configuration.getProxyHost());
             clientConfiguration.setProxyPort(configuration.getProxyPort());
+            clientConfiguration.setMaxConnections(configuration.getMaxConnections());
+            isClientConfigFound = true;
+        } else {
+            clientConfiguration = new ClientConfiguration();
+            clientConfiguration.setMaxConnections(configuration.getMaxConnections());
             isClientConfigFound = true;
         }
         if (configuration.getAccessKey() != null && configuration.getSecretKey() != null) {


[2/2] camel git commit: CAMEL-11697 - Updated docs

Posted by ac...@apache.org.
CAMEL-11697 - Updated docs


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

Branch: refs/heads/master
Commit: 94a10c42ef0a2aea58f8b6f6db4c8a0cf0dd51e9
Parents: 58bfe20
Author: Andrea Cosentino <an...@gmail.com>
Authored: Wed Aug 23 15:24:28 2017 +0200
Committer: Andrea Cosentino <an...@gmail.com>
Committed: Wed Aug 23 15:24:28 2017 +0200

----------------------------------------------------------------------
 components/camel-aws/src/main/docs/aws-s3-component.adoc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/94a10c42/components/camel-aws/src/main/docs/aws-s3-component.adoc
----------------------------------------------------------------------
diff --git a/components/camel-aws/src/main/docs/aws-s3-component.adoc b/components/camel-aws/src/main/docs/aws-s3-component.adoc
index f893a9f..524b790 100644
--- a/components/camel-aws/src/main/docs/aws-s3-component.adoc
+++ b/components/camel-aws/src/main/docs/aws-s3-component.adoc
@@ -63,7 +63,7 @@ with the following path and query parameters:
 | **bucketNameOrArn** | *Required* Bucket name or ARN |  | String
 |=======================================================================
 
-#### Query Parameters (40 parameters):
+#### Query Parameters (41 parameters):
 
 [width="100%",cols="2,5,^1,2",options="header"]
 |=======================================================================
@@ -81,6 +81,7 @@ with the following path and query parameters:
 | **deleteAfterRead** (consumer) | Delete objects from S3 after they have been retrieved. The delete is only performed if the Exchange is committed. If a rollback occurs the object is not deleted. If this option is false then the same objects will be retrieve over and over again on the polls. Therefore you need to use the Idempotent Consumer EIP in the route to filter out duplicates. You can filter using the link S3ConstantsBUCKET_NAME and link S3ConstantsKEY headers or only the link S3ConstantsKEY header. | true | boolean
 | **fileName** (consumer) | To get the object from the bucket with the given file name |  | String
 | **includeBody** (consumer) | If it is true the exchange body will be set to a stream to the contents of the file. If false the headers will be set with the S3 object metadata but the body will be null. This option is strongly related to autocloseBody option. In case of setting includeBody to true and autocloseBody to false it will be up to the caller to close the S3Object stream. Setting autocloseBody to true will close the S3Object stream automatically. | true | boolean
+| **maxConnections** (consumer) | Set the maxConnections parameter in the S3 client configuration | 50 | int
 | **maxMessagesPerPoll** (consumer) | Gets the maximum number of messages as a limit to poll at each polling. Is default unlimited but use 0 or negative number to disable it as unlimited. | 10 | int
 | **prefix** (consumer) | Camel 2.10.1: The prefix which is used in the com.amazonaws.services.s3.model.ListObjectsRequest to only consume objects we are interested in. |  | String
 | **sendEmptyMessageWhenIdle** (consumer) | If the polling consumer did not poll any files you can enable this option to send an empty message (no body) instead. | false | boolean