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 2021/04/02 06:15:33 UTC

[camel] branch master updated (c236bae -> 09abcfa)

This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git.


    from c236bae  Merge remote-tracking branch 'origin/master'
     new e31e2ed  CAMEL-16185 - Improved Javadoc
     new 1756eea  Regen
     new 73e414d  Camel-AWS2-S3: Extract common method in an utility class
     new 517b746  Camel-AWS2-S3: Regen
     new 8323fe1  Camel-AWS2-S3: Cleanup
     new 09abcfa  Camel-AWS2-S3: Better logging

The 6 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../camel/catalog/docs/aws2-s3-component.adoc      | 12 +--
 .../apache/camel/component/aws2/s3/aws2-s3.json    | 12 +--
 .../src/main/docs/aws2-s3-component.adoc           | 12 +--
 .../component/aws2/s3/AWS2S3Configuration.java     |  6 +-
 .../camel/component/aws2/s3/AWS2S3Producer.java    | 91 +++++-----------------
 .../aws2/s3/stream/AWS2S3StreamUploadProducer.java | 73 ++---------------
 .../camel/component/aws2/s3/utils/AWS2S3Utils.java | 87 +++++++++++++++++++++
 .../dsl/Aws2S3ComponentBuilderFactory.java         |  7 +-
 .../endpoint/dsl/AWS2S3EndpointBuilderFactory.java | 14 ++--
 .../modules/ROOT/pages/aws2-s3-component.adoc      | 12 +--
 10 files changed, 152 insertions(+), 174 deletions(-)
 create mode 100644 components/camel-aws/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/utils/AWS2S3Utils.java

[camel] 03/06: Camel-AWS2-S3: Extract common method in an utility class

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 73e414d80f984ae7d497f0f138549a515c33f3f0
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Fri Apr 2 07:55:10 2021 +0200

    Camel-AWS2-S3: Extract common method in an utility class
---
 .../camel/component/aws2/s3/AWS2S3Producer.java    | 89 +++++-----------------
 .../aws2/s3/stream/AWS2S3StreamUploadProducer.java | 67 +---------------
 .../camel/component/aws2/s3/utils/AWS2S3Utils.java | 87 +++++++++++++++++++++
 3 files changed, 110 insertions(+), 133 deletions(-)

diff --git a/components/camel-aws/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/AWS2S3Producer.java b/components/camel-aws/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/AWS2S3Producer.java
index f497d17..9ee8ecb 100644
--- a/components/camel-aws/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/AWS2S3Producer.java
+++ b/components/camel-aws/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/AWS2S3Producer.java
@@ -33,6 +33,7 @@ import org.apache.camel.Exchange;
 import org.apache.camel.InvalidPayloadException;
 import org.apache.camel.Message;
 import org.apache.camel.WrappedFile;
+import org.apache.camel.component.aws2.s3.utils.AWS2S3Utils;
 import org.apache.camel.support.DefaultProducer;
 import org.apache.camel.util.FileUtil;
 import org.apache.camel.util.IOHelper;
@@ -153,11 +154,11 @@ public class AWS2S3Producer extends DefaultProducer {
             objectMetadata.put("Content-Length", String.valueOf(filePayload.length()));
         }
 
-        final String keyName = determineKey(exchange);
+        final String keyName = AWS2S3Utils.determineKey(exchange, getConfiguration());
         CreateMultipartUploadRequest.Builder createMultipartUploadRequest
                 = CreateMultipartUploadRequest.builder().bucket(getConfiguration().getBucketName()).key(keyName);
 
-        String storageClass = determineStorageClass(exchange);
+        String storageClass = AWS2S3Utils.determineStorageClass(exchange, getConfiguration());
         if (storageClass != null) {
             createMultipartUploadRequest.storageClass(storageClass);
         }
@@ -270,7 +271,7 @@ public class AWS2S3Producer extends DefaultProducer {
                 if (objectMetadata.get("Content-Length").equals("0")
                         && ObjectHelper.isEmpty(exchange.getProperty(Exchange.CONTENT_LENGTH))) {
                     LOG.debug("The content length is not defined. It needs to be determined by reading the data into memory");
-                    baos = determineLengthInputStream(is);
+                    baos = AWS2S3Utils.determineLengthInputStream(is);
                     objectMetadata.put("Content-Length", String.valueOf(baos.size()));
                     is = new ByteArrayInputStream(baos.toByteArray());
                 } else {
@@ -281,11 +282,11 @@ public class AWS2S3Producer extends DefaultProducer {
             }
         }
 
-        final String bucketName = determineBucketName(exchange);
-        final String key = determineKey(exchange);
+        final String bucketName = AWS2S3Utils.determineBucketName(exchange, getConfiguration());
+        final String key = AWS2S3Utils.determineKey(exchange, getConfiguration());
         putObjectRequest.bucket(bucketName).key(key).metadata(objectMetadata);
 
-        String storageClass = determineStorageClass(exchange);
+        String storageClass = AWS2S3Utils.determineStorageClass(exchange, getConfiguration());
         if (storageClass != null) {
             putObjectRequest.storageClass(storageClass);
         }
@@ -344,8 +345,8 @@ public class AWS2S3Producer extends DefaultProducer {
     }
 
     private void copyObject(S3Client s3Client, Exchange exchange) throws InvalidPayloadException {
-        final String bucketName = determineBucketName(exchange);
-        final String sourceKey = determineKey(exchange);
+        final String bucketName = AWS2S3Utils.determineBucketName(exchange, getConfiguration());
+        final String sourceKey = AWS2S3Utils.determineKey(exchange, getConfiguration());
         final String destinationKey = exchange.getIn().getHeader(AWS2S3Constants.DESTINATION_KEY, String.class);
         final String bucketNameDestination = exchange.getIn().getHeader(AWS2S3Constants.BUCKET_DESTINATION_NAME, String.class);
         if (getConfiguration().isPojoRequest()) {
@@ -396,8 +397,8 @@ public class AWS2S3Producer extends DefaultProducer {
     }
 
     private void deleteObject(S3Client s3Client, Exchange exchange) throws InvalidPayloadException {
-        final String bucketName = determineBucketName(exchange);
-        final String sourceKey = determineKey(exchange);
+        final String bucketName = AWS2S3Utils.determineBucketName(exchange, getConfiguration());
+        final String sourceKey = AWS2S3Utils.determineKey(exchange, getConfiguration());
         if (getConfiguration().isPojoRequest()) {
             Object payload = exchange.getIn().getMandatoryBody();
             if (payload instanceof DeleteObjectRequest) {
@@ -423,7 +424,7 @@ public class AWS2S3Producer extends DefaultProducer {
     }
 
     private void deleteBucket(S3Client s3Client, Exchange exchange) throws InvalidPayloadException {
-        final String bucketName = determineBucketName(exchange);
+        final String bucketName = AWS2S3Utils.determineBucketName(exchange, getConfiguration());
 
         if (getConfiguration().isPojoRequest()) {
             Object payload = exchange.getIn().getMandatoryBody();
@@ -453,8 +454,8 @@ public class AWS2S3Producer extends DefaultProducer {
                 message.setBody(res);
             }
         } else {
-            final String bucketName = determineBucketName(exchange);
-            final String sourceKey = determineKey(exchange);
+            final String bucketName = AWS2S3Utils.determineBucketName(exchange, getConfiguration());
+            final String sourceKey = AWS2S3Utils.determineKey(exchange,getConfiguration());
             GetObjectRequest.Builder req = GetObjectRequest.builder().bucket(bucketName).key(sourceKey);
             ResponseInputStream<GetObjectResponse> res = s3Client.getObject(req.build(), ResponseTransformer.toInputStream());
 
@@ -464,8 +465,8 @@ public class AWS2S3Producer extends DefaultProducer {
     }
 
     private void getObjectRange(S3Client s3Client, Exchange exchange) throws InvalidPayloadException {
-        final String bucketName = determineBucketName(exchange);
-        final String sourceKey = determineKey(exchange);
+        final String bucketName = AWS2S3Utils.determineBucketName(exchange, getConfiguration());
+        final String sourceKey = AWS2S3Utils.determineKey(exchange, getConfiguration());
         final String rangeStart = exchange.getIn().getHeader(AWS2S3Constants.RANGE_START, String.class);
         final String rangeEnd = exchange.getIn().getHeader(AWS2S3Constants.RANGE_END, String.class);
 
@@ -494,7 +495,7 @@ public class AWS2S3Producer extends DefaultProducer {
     }
 
     private void listObjects(S3Client s3Client, Exchange exchange) throws InvalidPayloadException {
-        final String bucketName = determineBucketName(exchange);
+        final String bucketName = AWS2S3Utils.determineBucketName(exchange, getConfiguration());
 
         if (getConfiguration().isPojoRequest()) {
             Object payload = exchange.getIn().getMandatoryBody();
@@ -513,8 +514,8 @@ public class AWS2S3Producer extends DefaultProducer {
     }
 
     private void createDownloadLink(S3Client s3Client, Exchange exchange) {
-        final String bucketName = determineBucketName(exchange);
-        final String key = determineKey(exchange);
+        final String bucketName = AWS2S3Utils.determineBucketName(exchange, getConfiguration());
+        final String key = AWS2S3Utils.determineKey(exchange, getConfiguration());
 
         long milliSeconds = 0;
 
@@ -599,58 +600,6 @@ public class AWS2S3Producer extends DefaultProducer {
         return objectMetadata;
     }
 
-    /**
-     * Reads the bucket name from the header of the given exchange. If not provided, it's read from the endpoint
-     * configuration.
-     *
-     * @param  exchange                 The exchange to read the header from.
-     * @return                          The bucket name.
-     * @throws IllegalArgumentException if the header could not be determined.
-     */
-    private String determineBucketName(final Exchange exchange) {
-        String bucketName = exchange.getIn().getHeader(AWS2S3Constants.BUCKET_NAME, String.class);
-
-        if (ObjectHelper.isEmpty(bucketName)) {
-            bucketName = getConfiguration().getBucketName();
-            LOG.trace("AWS S3 Bucket name header is missing, using default one [{}]", bucketName);
-        }
-
-        if (bucketName == null) {
-            throw new IllegalArgumentException("AWS S3 Bucket name header is missing or not configured.");
-        }
-
-        return bucketName;
-    }
-
-    private String determineKey(final Exchange exchange) {
-        String key = exchange.getIn().getHeader(AWS2S3Constants.KEY, String.class);
-        if (ObjectHelper.isEmpty(key)) {
-            key = getConfiguration().getKeyName();
-        }
-        if (key == null) {
-            throw new IllegalArgumentException("AWS S3 Key header missing.");
-        }
-        return key;
-    }
-
-    private String determineStorageClass(final Exchange exchange) {
-        String storageClass = exchange.getIn().getHeader(AWS2S3Constants.STORAGE_CLASS, String.class);
-        if (storageClass == null) {
-            storageClass = getConfiguration().getStorageClass();
-        }
-
-        return storageClass;
-    }
-
-    private ByteArrayOutputStream determineLengthInputStream(InputStream is) throws IOException {
-        ByteArrayOutputStream out = new ByteArrayOutputStream();
-        byte[] bytes = new byte[1024];
-        int count;
-        while ((count = is.read(bytes)) > 0) {
-            out.write(bytes, 0, count);
-        }
-        return out;
-    }
 
     protected AWS2S3Configuration getConfiguration() {
         return getEndpoint().getConfiguration();
diff --git a/components/camel-aws/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/stream/AWS2S3StreamUploadProducer.java b/components/camel-aws/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/stream/AWS2S3StreamUploadProducer.java
index a4012b6..2d06bd9 100644
--- a/components/camel-aws/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/stream/AWS2S3StreamUploadProducer.java
+++ b/components/camel-aws/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/stream/AWS2S3StreamUploadProducer.java
@@ -30,6 +30,7 @@ import org.apache.camel.Message;
 import org.apache.camel.component.aws2.s3.AWS2S3Configuration;
 import org.apache.camel.component.aws2.s3.AWS2S3Constants;
 import org.apache.camel.component.aws2.s3.AWS2S3Endpoint;
+import org.apache.camel.component.aws2.s3.utils.AWS2S3Utils;
 import org.apache.camel.support.DefaultProducer;
 import org.apache.camel.util.ObjectHelper;
 import org.apache.camel.util.URISupport;
@@ -77,8 +78,8 @@ public class AWS2S3StreamUploadProducer extends DefaultProducer {
         buffer.write(IoUtils.toByteArray(is));
 
         final String keyName = getConfiguration().getKeyName();
-        final String fileName = determineFileName(keyName);
-        final String extension = determineFileExtension(keyName);
+        final String fileName = AWS2S3Utils.determineFileName(keyName);
+        final String extension = AWS2S3Utils.determineFileExtension(keyName);
         if (index.get() == 1 && getConfiguration().getNamingStrategy().equals(AWSS3NamingStrategyEnum.random)) {
             id = UUID.randomUUID();
         }
@@ -86,7 +87,7 @@ public class AWS2S3StreamUploadProducer extends DefaultProducer {
         CreateMultipartUploadRequest.Builder createMultipartUploadRequest
                 = CreateMultipartUploadRequest.builder().bucket(getConfiguration().getBucketName()).key(dynamicKeyName);
 
-        String storageClass = determineStorageClass(exchange);
+        String storageClass = AWS2S3Utils.determineStorageClass(exchange, getConfiguration());
         if (storageClass != null) {
             createMultipartUploadRequest.storageClass(storageClass);
         }
@@ -216,66 +217,6 @@ public class AWS2S3StreamUploadProducer extends DefaultProducer {
         return dynamicKeyName;
     }
 
-    /**
-     * Reads the bucket name from the header of the given exchange. If not provided, it's read from the endpoint
-     * configuration.
-     *
-     * @param  exchange                 The exchange to read the header from.
-     * @return                          The bucket name.
-     * @throws IllegalArgumentException if the header could not be determined.
-     */
-    private String determineBucketName(final Exchange exchange) {
-        String bucketName = exchange.getIn().getHeader(AWS2S3Constants.BUCKET_NAME, String.class);
-
-        if (ObjectHelper.isEmpty(bucketName)) {
-            bucketName = getConfiguration().getBucketName();
-            LOG.trace("AWS S3 Bucket name header is missing, using default one [{}]", bucketName);
-        }
-
-        if (bucketName == null) {
-            throw new IllegalArgumentException("AWS S3 Bucket name header is missing or not configured.");
-        }
-
-        return bucketName;
-    }
-
-    private String determineStorageClass(final Exchange exchange) {
-        String storageClass = exchange.getIn().getHeader(AWS2S3Constants.STORAGE_CLASS, String.class);
-        if (storageClass == null) {
-            storageClass = getConfiguration().getStorageClass();
-        }
-
-        return storageClass;
-    }
-
-    private String determineFileExtension(String keyName) {
-        int extPosition = keyName.lastIndexOf(".");
-        if (extPosition == -1) {
-            return "";
-        } else {
-            return keyName.substring(extPosition);
-        }
-    }
-
-    private String determineFileName(String keyName) {
-        int extPosition = keyName.lastIndexOf(".");
-        if (extPosition == -1) {
-            return keyName;
-        } else {
-            return keyName.substring(0, extPosition);
-        }
-    }
-
-    private ByteArrayOutputStream determineLengthInputStream(InputStream is) throws IOException {
-        ByteArrayOutputStream out = new ByteArrayOutputStream();
-        byte[] bytes = new byte[1024];
-        int count;
-        while ((count = is.read(bytes)) > 0) {
-            out.write(bytes, 0, count);
-        }
-        return out;
-    }
-
     protected AWS2S3Configuration getConfiguration() {
         return getEndpoint().getConfiguration();
     }
diff --git a/components/camel-aws/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/utils/AWS2S3Utils.java b/components/camel-aws/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/utils/AWS2S3Utils.java
new file mode 100644
index 0000000..7f9d669
--- /dev/null
+++ b/components/camel-aws/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/utils/AWS2S3Utils.java
@@ -0,0 +1,87 @@
+package org.apache.camel.component.aws2.s3.utils;
+
+import org.apache.camel.Exchange;
+import org.apache.camel.component.aws2.s3.AWS2S3Configuration;
+import org.apache.camel.component.aws2.s3.AWS2S3Constants;
+import org.apache.camel.util.ObjectHelper;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+
+public final class AWS2S3Utils {
+
+    private AWS2S3Utils() {
+    }
+
+    /**
+     * Reads the bucket name from the header of the given exchange. If not provided, it's read from the endpoint
+     * configuration.
+     *
+     * @param  exchange                 The exchange to read the header from
+     * @param  configuration            The AWS2 S3 configuration
+     * @return                          The bucket name.
+     * @throws IllegalArgumentException if the header could not be determined.
+     */
+    public static String determineBucketName(final Exchange exchange, AWS2S3Configuration configuration) {
+        String bucketName = exchange.getIn().getHeader(AWS2S3Constants.BUCKET_NAME, String.class);
+
+        if (ObjectHelper.isEmpty(bucketName)) {
+            bucketName = configuration.getBucketName();
+        }
+
+        if (bucketName == null) {
+            throw new IllegalArgumentException("AWS S3 Bucket name header is missing or not configured.");
+        }
+
+        return bucketName;
+    }
+
+    public static String determineStorageClass(final Exchange exchange, AWS2S3Configuration configuration) {
+        String storageClass = exchange.getIn().getHeader(AWS2S3Constants.STORAGE_CLASS, String.class);
+        if (storageClass == null) {
+            storageClass = configuration.getStorageClass();
+        }
+
+        return storageClass;
+    }
+
+    public static String determineFileExtension(String keyName) {
+        int extPosition = keyName.lastIndexOf(".");
+        if (extPosition == -1) {
+            return "";
+        } else {
+            return keyName.substring(extPosition);
+        }
+    }
+
+    public static String determineFileName(String keyName) {
+        int extPosition = keyName.lastIndexOf(".");
+        if (extPosition == -1) {
+            return keyName;
+        } else {
+            return keyName.substring(0, extPosition);
+        }
+    }
+
+    public static ByteArrayOutputStream determineLengthInputStream(InputStream is) throws IOException {
+        ByteArrayOutputStream out = new ByteArrayOutputStream();
+        byte[] bytes = new byte[1024];
+        int count;
+        while ((count = is.read(bytes)) > 0) {
+            out.write(bytes, 0, count);
+        }
+        return out;
+    }
+
+    public static String determineKey(final Exchange exchange, AWS2S3Configuration configuration) {
+        String key = exchange.getIn().getHeader(AWS2S3Constants.KEY, String.class);
+        if (ObjectHelper.isEmpty(key)) {
+            key = configuration.getKeyName();
+        }
+        if (key == null) {
+            throw new IllegalArgumentException("AWS S3 Key header missing.");
+        }
+        return key;
+    }
+}

[camel] 02/06: Regen

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 1756eea8e7cf47cd33b216290d44f8cac2ff8875
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Fri Apr 2 07:31:28 2021 +0200

    Regen
---
 .../org/apache/camel/catalog/docs/aws2-s3-component.adoc   | 12 ++++++------
 .../org/apache/camel/component/aws2/s3/aws2-s3.json        | 12 ++++++------
 .../camel-aws2-s3/src/main/docs/aws2-s3-component.adoc     | 12 ++++++------
 .../component/dsl/Aws2S3ComponentBuilderFactory.java       |  7 ++++---
 .../builder/endpoint/dsl/AWS2S3EndpointBuilderFactory.java | 14 ++++++++------
 docs/components/modules/ROOT/pages/aws2-s3-component.adoc  | 12 ++++++------
 6 files changed, 36 insertions(+), 33 deletions(-)

diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/aws2-s3-component.adoc b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/aws2-s3-component.adoc
index 16de086..b9f86e9 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/aws2-s3-component.adoc
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/aws2-s3-component.adoc
@@ -85,16 +85,16 @@ The AWS 2 S3 Storage Service component supports 47 options, which are listed bel
 | *prefix* (consumer) | The prefix which is used in the com.amazonaws.services.s3.model.ListObjectsRequest to only consume objects we are interested in. |  | String
 | *autocloseBody* (consumer) | If this option is true and includeBody is false, then the S3Object.close() method will be called on exchange completion. This option is strongly related to includeBody option. In case of setting includeBody to false 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
 | *batchMessageNumber* (producer) | The number of messages composing a batch in stream mode | 10 | int
-| *batchSize* (producer) | The batch size in stream mode | 1000000 | int
+| *batchSize* (producer) | The batch size (in bytes) in stream mode | 1000000 | int
 | *deleteAfterWrite* (producer) | Delete file object after the S3 file has been uploaded | false | boolean
 | *keyName* (producer) | Setting the key name for an element in the bucket through endpoint parameter |  | 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 [...]
 | *multiPartUpload* (producer) | If it is true, camel will upload the file with multi part format, the part size is decided by the option of partSize | false | boolean
-| *namingStrategy* (producer) | The naming strategy to use. There are 2 enums and the value can be one of: progressive, random | progressive | AWSS3NamingStrategyEnum
+| *namingStrategy* (producer) | The naming strategy to use in stream mode. There are 2 enums and the value can be one of: progressive, random | progressive | AWSS3NamingStrategyEnum
 | *operation* (producer) | The operation to do in case the user don't want to do only an upload. There are 7 enums and the value can be one of: copyObject, listObjects, deleteObject, deleteBucket, listBuckets, getObject, getObjectRange |  | AWS2S3Operations
 | *partSize* (producer) | Setup the partSize which is used in multi part upload, the default size is 25M. | 26214400 | long
 | *storageClass* (producer) | The storage class to set in the com.amazonaws.services.s3.model.PutObjectRequest request. |  | String
-| *streamMode* (producer) | If StreaMode is true a different way of uploading will be provided | false | boolean
+| *streamMode* (producer) | When stream mode is true the upload to bucket will be done in streaming | false | boolean
 | *awsKMSKeyId* (producer) | Define the id of KMS key to use in case KMS is enabled |  | String
 | *useAwsKMS* (producer) | Define if KMS must be used or not | false | boolean
 | *useCustomerKey* (producer) | Define if Customer Key must be used or not | false | boolean
@@ -175,16 +175,16 @@ with the following path and query parameters:
 | *exchangePattern* (consumer) | Sets the exchange pattern when the consumer creates an exchange. There are 3 enums and the value can be one of: InOnly, InOut, InOptionalOut |  | ExchangePattern
 | *pollStrategy* (consumer) | A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your custom implementation to control error handling usually occurred during the poll operation before an Exchange have been created and being routed in Camel. |  | PollingConsumerPollStrategy
 | *batchMessageNumber* (producer) | The number of messages composing a batch in stream mode | 10 | int
-| *batchSize* (producer) | The batch size in stream mode | 1000000 | int
+| *batchSize* (producer) | The batch size (in bytes) in stream mode | 1000000 | int
 | *deleteAfterWrite* (producer) | Delete file object after the S3 file has been uploaded | false | boolean
 | *keyName* (producer) | Setting the key name for an element in the bucket through endpoint parameter |  | 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 [...]
 | *multiPartUpload* (producer) | If it is true, camel will upload the file with multi part format, the part size is decided by the option of partSize | false | boolean
-| *namingStrategy* (producer) | The naming strategy to use. There are 2 enums and the value can be one of: progressive, random | progressive | AWSS3NamingStrategyEnum
+| *namingStrategy* (producer) | The naming strategy to use in stream mode. There are 2 enums and the value can be one of: progressive, random | progressive | AWSS3NamingStrategyEnum
 | *operation* (producer) | The operation to do in case the user don't want to do only an upload. There are 7 enums and the value can be one of: copyObject, listObjects, deleteObject, deleteBucket, listBuckets, getObject, getObjectRange |  | AWS2S3Operations
 | *partSize* (producer) | Setup the partSize which is used in multi part upload, the default size is 25M. | 26214400 | long
 | *storageClass* (producer) | The storage class to set in the com.amazonaws.services.s3.model.PutObjectRequest request. |  | String
-| *streamMode* (producer) | If StreaMode is true a different way of uploading will be provided | false | boolean
+| *streamMode* (producer) | When stream mode is true the upload to bucket will be done in streaming | false | boolean
 | *awsKMSKeyId* (producer) | Define the id of KMS key to use in case KMS is enabled |  | String
 | *useAwsKMS* (producer) | Define if KMS must be used or not | false | boolean
 | *useCustomerKey* (producer) | Define if Customer Key must be used or not | false | boolean
diff --git a/components/camel-aws/camel-aws2-s3/src/generated/resources/org/apache/camel/component/aws2/s3/aws2-s3.json b/components/camel-aws/camel-aws2-s3/src/generated/resources/org/apache/camel/component/aws2/s3/aws2-s3.json
index 09a499e..feced29 100644
--- a/components/camel-aws/camel-aws2-s3/src/generated/resources/org/apache/camel/component/aws2/s3/aws2-s3.json
+++ b/components/camel-aws/camel-aws2-s3/src/generated/resources/org/apache/camel/component/aws2/s3/aws2-s3.json
@@ -53,16 +53,16 @@
     "prefix": { "kind": "property", "displayName": "Prefix", "group": "consumer", "label": "consumer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.s3.AWS2S3Configuration", "configurationField": "configuration", "description": "The prefix which is used in the com.amazonaws.services.s3.model.ListObjectsRequest to only consume objects we are interested in." },
     "autocloseBody": { "kind": "property", "displayName": "Autoclose Body", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "configurationClass": "org.apache.camel.component.aws2.s3.AWS2S3Configuration", "configurationField": "configuration", "description": "If this option is true and includeBody is false, then the S3Object.close() met [...]
     "batchMessageNumber": { "kind": "property", "displayName": "Batch Message Number", "group": "producer", "label": "producer", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 10, "configurationClass": "org.apache.camel.component.aws2.s3.AWS2S3Configuration", "configurationField": "configuration", "description": "The number of messages composing a batch in stream mode" },
-    "batchSize": { "kind": "property", "displayName": "Batch Size", "group": "producer", "label": "producer", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 1000000, "configurationClass": "org.apache.camel.component.aws2.s3.AWS2S3Configuration", "configurationField": "configuration", "description": "The batch size in stream mode" },
+    "batchSize": { "kind": "property", "displayName": "Batch Size", "group": "producer", "label": "producer", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 1000000, "configurationClass": "org.apache.camel.component.aws2.s3.AWS2S3Configuration", "configurationField": "configuration", "description": "The batch size (in bytes) in stream mode" },
     "deleteAfterWrite": { "kind": "property", "displayName": "Delete After Write", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.s3.AWS2S3Configuration", "configurationField": "configuration", "description": "Delete file object after the S3 file has been uploaded" },
     "keyName": { "kind": "property", "displayName": "Key Name", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.s3.AWS2S3Configuration", "configurationField": "configuration", "description": "Setting the key name for an element in the bucket through endpoint parameter" },
     "lazyStartProducer": { "kind": "property", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": 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 star [...]
     "multiPartUpload": { "kind": "property", "displayName": "Multi Part Upload", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.s3.AWS2S3Configuration", "configurationField": "configuration", "description": "If it is true, camel will upload the file with multi part format, the part size is decided b [...]
-    "namingStrategy": { "kind": "property", "displayName": "Naming Strategy", "group": "producer", "label": "producer", "required": false, "type": "object", "javaType": "org.apache.camel.component.aws2.s3.stream.AWSS3NamingStrategyEnum", "enum": [ "progressive", "random" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "progressive", "configurationClass": "org.apache.camel.component.aws2.s3.AWS2S3Configuration", "configurationField": "configuration", "descript [...]
+    "namingStrategy": { "kind": "property", "displayName": "Naming Strategy", "group": "producer", "label": "producer", "required": false, "type": "object", "javaType": "org.apache.camel.component.aws2.s3.stream.AWSS3NamingStrategyEnum", "enum": [ "progressive", "random" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "progressive", "configurationClass": "org.apache.camel.component.aws2.s3.AWS2S3Configuration", "configurationField": "configuration", "descript [...]
     "operation": { "kind": "property", "displayName": "Operation", "group": "producer", "label": "producer", "required": false, "type": "object", "javaType": "org.apache.camel.component.aws2.s3.AWS2S3Operations", "enum": [ "copyObject", "listObjects", "deleteObject", "deleteBucket", "listBuckets", "getObject", "getObjectRange" ], "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.s3.AWS2S3Configuration", "configurationField":  [...]
     "partSize": { "kind": "property", "displayName": "Part Size", "group": "producer", "label": "producer", "required": false, "type": "integer", "javaType": "long", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 26214400, "configurationClass": "org.apache.camel.component.aws2.s3.AWS2S3Configuration", "configurationField": "configuration", "description": "Setup the partSize which is used in multi part upload, the default size is 25M." },
     "storageClass": { "kind": "property", "displayName": "Storage Class", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.s3.AWS2S3Configuration", "configurationField": "configuration", "description": "The storage class to set in the com.amazonaws.services.s3.model.PutObjectRequest request." },
-    "streamMode": { "kind": "property", "displayName": "Stream Mode", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.s3.AWS2S3Configuration", "configurationField": "configuration", "description": "If StreaMode is true a different way of uploading will be provided" },
+    "streamMode": { "kind": "property", "displayName": "Stream Mode", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.s3.AWS2S3Configuration", "configurationField": "configuration", "description": "When stream mode is true the upload to bucket will be done in streaming" },
     "awsKMSKeyId": { "kind": "property", "displayName": "Aws KMSKey Id", "group": "producer (advanced)", "label": "producer,advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.s3.AWS2S3Configuration", "configurationField": "configuration", "description": "Define the id of KMS key to use in case KMS is enabled" },
     "useAwsKMS": { "kind": "property", "displayName": "Use Aws KMS", "group": "producer (advanced)", "label": "producer,advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.s3.AWS2S3Configuration", "configurationField": "configuration", "description": "Define if KMS must be used or not" },
     "useCustomerKey": { "kind": "property", "displayName": "Use Customer Key", "group": "producer (advanced)", "label": "producer,advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.s3.AWS2S3Configuration", "configurationField": "configuration", "description": "Define if Customer Key must be used or not" },
@@ -108,16 +108,16 @@
     "exchangePattern": { "kind": "parameter", "displayName": "Exchange Pattern", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "object", "javaType": "org.apache.camel.ExchangePattern", "enum": [ "InOnly", "InOut", "InOptionalOut" ], "deprecated": false, "autowired": false, "secret": false, "description": "Sets the exchange pattern when the consumer creates an exchange." },
     "pollStrategy": { "kind": "parameter", "displayName": "Poll Strategy", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "object", "javaType": "org.apache.camel.spi.PollingConsumerPollStrategy", "deprecated": false, "autowired": false, "secret": false, "description": "A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your custom implementation to control error handling usually occurred during the poll operation  [...]
     "batchMessageNumber": { "kind": "parameter", "displayName": "Batch Message Number", "group": "producer", "label": "producer", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 10, "configurationClass": "org.apache.camel.component.aws2.s3.AWS2S3Configuration", "configurationField": "configuration", "description": "The number of messages composing a batch in stream mode" },
-    "batchSize": { "kind": "parameter", "displayName": "Batch Size", "group": "producer", "label": "producer", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 1000000, "configurationClass": "org.apache.camel.component.aws2.s3.AWS2S3Configuration", "configurationField": "configuration", "description": "The batch size in stream mode" },
+    "batchSize": { "kind": "parameter", "displayName": "Batch Size", "group": "producer", "label": "producer", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 1000000, "configurationClass": "org.apache.camel.component.aws2.s3.AWS2S3Configuration", "configurationField": "configuration", "description": "The batch size (in bytes) in stream mode" },
     "deleteAfterWrite": { "kind": "parameter", "displayName": "Delete After Write", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.s3.AWS2S3Configuration", "configurationField": "configuration", "description": "Delete file object after the S3 file has been uploaded" },
     "keyName": { "kind": "parameter", "displayName": "Key Name", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.s3.AWS2S3Configuration", "configurationField": "configuration", "description": "Setting the key name for an element in the bucket through endpoint parameter" },
     "lazyStartProducer": { "kind": "parameter", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": 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 sta [...]
     "multiPartUpload": { "kind": "parameter", "displayName": "Multi Part Upload", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.s3.AWS2S3Configuration", "configurationField": "configuration", "description": "If it is true, camel will upload the file with multi part format, the part size is decided  [...]
-    "namingStrategy": { "kind": "parameter", "displayName": "Naming Strategy", "group": "producer", "label": "producer", "required": false, "type": "object", "javaType": "org.apache.camel.component.aws2.s3.stream.AWSS3NamingStrategyEnum", "enum": [ "progressive", "random" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "progressive", "configurationClass": "org.apache.camel.component.aws2.s3.AWS2S3Configuration", "configurationField": "configuration", "descrip [...]
+    "namingStrategy": { "kind": "parameter", "displayName": "Naming Strategy", "group": "producer", "label": "producer", "required": false, "type": "object", "javaType": "org.apache.camel.component.aws2.s3.stream.AWSS3NamingStrategyEnum", "enum": [ "progressive", "random" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "progressive", "configurationClass": "org.apache.camel.component.aws2.s3.AWS2S3Configuration", "configurationField": "configuration", "descrip [...]
     "operation": { "kind": "parameter", "displayName": "Operation", "group": "producer", "label": "producer", "required": false, "type": "object", "javaType": "org.apache.camel.component.aws2.s3.AWS2S3Operations", "enum": [ "copyObject", "listObjects", "deleteObject", "deleteBucket", "listBuckets", "getObject", "getObjectRange" ], "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.s3.AWS2S3Configuration", "configurationField": [...]
     "partSize": { "kind": "parameter", "displayName": "Part Size", "group": "producer", "label": "producer", "required": false, "type": "integer", "javaType": "long", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 26214400, "configurationClass": "org.apache.camel.component.aws2.s3.AWS2S3Configuration", "configurationField": "configuration", "description": "Setup the partSize which is used in multi part upload, the default size is 25M." },
     "storageClass": { "kind": "parameter", "displayName": "Storage Class", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.s3.AWS2S3Configuration", "configurationField": "configuration", "description": "The storage class to set in the com.amazonaws.services.s3.model.PutObjectRequest request." },
-    "streamMode": { "kind": "parameter", "displayName": "Stream Mode", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.s3.AWS2S3Configuration", "configurationField": "configuration", "description": "If StreaMode is true a different way of uploading will be provided" },
+    "streamMode": { "kind": "parameter", "displayName": "Stream Mode", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.s3.AWS2S3Configuration", "configurationField": "configuration", "description": "When stream mode is true the upload to bucket will be done in streaming" },
     "awsKMSKeyId": { "kind": "parameter", "displayName": "Aws KMSKey Id", "group": "producer (advanced)", "label": "producer,advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.s3.AWS2S3Configuration", "configurationField": "configuration", "description": "Define the id of KMS key to use in case KMS is enabled" },
     "useAwsKMS": { "kind": "parameter", "displayName": "Use Aws KMS", "group": "producer (advanced)", "label": "producer,advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.s3.AWS2S3Configuration", "configurationField": "configuration", "description": "Define if KMS must be used or not" },
     "useCustomerKey": { "kind": "parameter", "displayName": "Use Customer Key", "group": "producer (advanced)", "label": "producer,advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.s3.AWS2S3Configuration", "configurationField": "configuration", "description": "Define if Customer Key must be used or not" },
diff --git a/components/camel-aws/camel-aws2-s3/src/main/docs/aws2-s3-component.adoc b/components/camel-aws/camel-aws2-s3/src/main/docs/aws2-s3-component.adoc
index 16de086..b9f86e9 100644
--- a/components/camel-aws/camel-aws2-s3/src/main/docs/aws2-s3-component.adoc
+++ b/components/camel-aws/camel-aws2-s3/src/main/docs/aws2-s3-component.adoc
@@ -85,16 +85,16 @@ The AWS 2 S3 Storage Service component supports 47 options, which are listed bel
 | *prefix* (consumer) | The prefix which is used in the com.amazonaws.services.s3.model.ListObjectsRequest to only consume objects we are interested in. |  | String
 | *autocloseBody* (consumer) | If this option is true and includeBody is false, then the S3Object.close() method will be called on exchange completion. This option is strongly related to includeBody option. In case of setting includeBody to false 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
 | *batchMessageNumber* (producer) | The number of messages composing a batch in stream mode | 10 | int
-| *batchSize* (producer) | The batch size in stream mode | 1000000 | int
+| *batchSize* (producer) | The batch size (in bytes) in stream mode | 1000000 | int
 | *deleteAfterWrite* (producer) | Delete file object after the S3 file has been uploaded | false | boolean
 | *keyName* (producer) | Setting the key name for an element in the bucket through endpoint parameter |  | 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 [...]
 | *multiPartUpload* (producer) | If it is true, camel will upload the file with multi part format, the part size is decided by the option of partSize | false | boolean
-| *namingStrategy* (producer) | The naming strategy to use. There are 2 enums and the value can be one of: progressive, random | progressive | AWSS3NamingStrategyEnum
+| *namingStrategy* (producer) | The naming strategy to use in stream mode. There are 2 enums and the value can be one of: progressive, random | progressive | AWSS3NamingStrategyEnum
 | *operation* (producer) | The operation to do in case the user don't want to do only an upload. There are 7 enums and the value can be one of: copyObject, listObjects, deleteObject, deleteBucket, listBuckets, getObject, getObjectRange |  | AWS2S3Operations
 | *partSize* (producer) | Setup the partSize which is used in multi part upload, the default size is 25M. | 26214400 | long
 | *storageClass* (producer) | The storage class to set in the com.amazonaws.services.s3.model.PutObjectRequest request. |  | String
-| *streamMode* (producer) | If StreaMode is true a different way of uploading will be provided | false | boolean
+| *streamMode* (producer) | When stream mode is true the upload to bucket will be done in streaming | false | boolean
 | *awsKMSKeyId* (producer) | Define the id of KMS key to use in case KMS is enabled |  | String
 | *useAwsKMS* (producer) | Define if KMS must be used or not | false | boolean
 | *useCustomerKey* (producer) | Define if Customer Key must be used or not | false | boolean
@@ -175,16 +175,16 @@ with the following path and query parameters:
 | *exchangePattern* (consumer) | Sets the exchange pattern when the consumer creates an exchange. There are 3 enums and the value can be one of: InOnly, InOut, InOptionalOut |  | ExchangePattern
 | *pollStrategy* (consumer) | A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your custom implementation to control error handling usually occurred during the poll operation before an Exchange have been created and being routed in Camel. |  | PollingConsumerPollStrategy
 | *batchMessageNumber* (producer) | The number of messages composing a batch in stream mode | 10 | int
-| *batchSize* (producer) | The batch size in stream mode | 1000000 | int
+| *batchSize* (producer) | The batch size (in bytes) in stream mode | 1000000 | int
 | *deleteAfterWrite* (producer) | Delete file object after the S3 file has been uploaded | false | boolean
 | *keyName* (producer) | Setting the key name for an element in the bucket through endpoint parameter |  | 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 [...]
 | *multiPartUpload* (producer) | If it is true, camel will upload the file with multi part format, the part size is decided by the option of partSize | false | boolean
-| *namingStrategy* (producer) | The naming strategy to use. There are 2 enums and the value can be one of: progressive, random | progressive | AWSS3NamingStrategyEnum
+| *namingStrategy* (producer) | The naming strategy to use in stream mode. There are 2 enums and the value can be one of: progressive, random | progressive | AWSS3NamingStrategyEnum
 | *operation* (producer) | The operation to do in case the user don't want to do only an upload. There are 7 enums and the value can be one of: copyObject, listObjects, deleteObject, deleteBucket, listBuckets, getObject, getObjectRange |  | AWS2S3Operations
 | *partSize* (producer) | Setup the partSize which is used in multi part upload, the default size is 25M. | 26214400 | long
 | *storageClass* (producer) | The storage class to set in the com.amazonaws.services.s3.model.PutObjectRequest request. |  | String
-| *streamMode* (producer) | If StreaMode is true a different way of uploading will be provided | false | boolean
+| *streamMode* (producer) | When stream mode is true the upload to bucket will be done in streaming | false | boolean
 | *awsKMSKeyId* (producer) | Define the id of KMS key to use in case KMS is enabled |  | String
 | *useAwsKMS* (producer) | Define if KMS must be used or not | false | boolean
 | *useCustomerKey* (producer) | Define if Customer Key must be used or not | false | boolean
diff --git a/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Aws2S3ComponentBuilderFactory.java b/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Aws2S3ComponentBuilderFactory.java
index d0c7a4b..f31f288 100644
--- a/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Aws2S3ComponentBuilderFactory.java
+++ b/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Aws2S3ComponentBuilderFactory.java
@@ -572,7 +572,7 @@ public interface Aws2S3ComponentBuilderFactory {
             return this;
         }
         /**
-         * The batch size in stream mode.
+         * The batch size (in bytes) in stream mode.
          * 
          * The option is a: &lt;code&gt;int&lt;/code&gt; type.
          * 
@@ -657,7 +657,7 @@ public interface Aws2S3ComponentBuilderFactory {
             return this;
         }
         /**
-         * The naming strategy to use.
+         * The naming strategy to use in stream mode.
          * 
          * The option is a:
          * &lt;code&gt;org.apache.camel.component.aws2.s3.stream.AWSS3NamingStrategyEnum&lt;/code&gt; type.
@@ -722,7 +722,8 @@ public interface Aws2S3ComponentBuilderFactory {
             return this;
         }
         /**
-         * If StreaMode is true a different way of uploading will be provided.
+         * When stream mode is true the upload to bucket will be done in
+         * streaming.
          * 
          * The option is a: &lt;code&gt;boolean&lt;/code&gt; type.
          * 
diff --git a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/AWS2S3EndpointBuilderFactory.java b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/AWS2S3EndpointBuilderFactory.java
index 1538e46..0f77798 100644
--- a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/AWS2S3EndpointBuilderFactory.java
+++ b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/AWS2S3EndpointBuilderFactory.java
@@ -1969,7 +1969,7 @@ public interface AWS2S3EndpointBuilderFactory {
             return this;
         }
         /**
-         * The batch size in stream mode.
+         * The batch size (in bytes) in stream mode.
          * 
          * The option is a: &lt;code&gt;int&lt;/code&gt; type.
          * 
@@ -1984,7 +1984,7 @@ public interface AWS2S3EndpointBuilderFactory {
             return this;
         }
         /**
-         * The batch size in stream mode.
+         * The batch size (in bytes) in stream mode.
          * 
          * The option will be converted to a &lt;code&gt;int&lt;/code&gt; type.
          * 
@@ -2131,7 +2131,7 @@ public interface AWS2S3EndpointBuilderFactory {
             return this;
         }
         /**
-         * The naming strategy to use.
+         * The naming strategy to use in stream mode.
          * 
          * The option is a:
          * &lt;code&gt;org.apache.camel.component.aws2.s3.stream.AWSS3NamingStrategyEnum&lt;/code&gt; type.
@@ -2148,7 +2148,7 @@ public interface AWS2S3EndpointBuilderFactory {
             return this;
         }
         /**
-         * The naming strategy to use.
+         * The naming strategy to use in stream mode.
          * 
          * The option will be converted to a
          * &lt;code&gt;org.apache.camel.component.aws2.s3.stream.AWSS3NamingStrategyEnum&lt;/code&gt; type.
@@ -2243,7 +2243,8 @@ public interface AWS2S3EndpointBuilderFactory {
             return this;
         }
         /**
-         * If StreaMode is true a different way of uploading will be provided.
+         * When stream mode is true the upload to bucket will be done in
+         * streaming.
          * 
          * The option is a: &lt;code&gt;boolean&lt;/code&gt; type.
          * 
@@ -2258,7 +2259,8 @@ public interface AWS2S3EndpointBuilderFactory {
             return this;
         }
         /**
-         * If StreaMode is true a different way of uploading will be provided.
+         * When stream mode is true the upload to bucket will be done in
+         * streaming.
          * 
          * The option will be converted to a &lt;code&gt;boolean&lt;/code&gt;
          * type.
diff --git a/docs/components/modules/ROOT/pages/aws2-s3-component.adoc b/docs/components/modules/ROOT/pages/aws2-s3-component.adoc
index 74be95e..5799ff8 100644
--- a/docs/components/modules/ROOT/pages/aws2-s3-component.adoc
+++ b/docs/components/modules/ROOT/pages/aws2-s3-component.adoc
@@ -87,16 +87,16 @@ The AWS 2 S3 Storage Service component supports 47 options, which are listed bel
 | *prefix* (consumer) | The prefix which is used in the com.amazonaws.services.s3.model.ListObjectsRequest to only consume objects we are interested in. |  | String
 | *autocloseBody* (consumer) | If this option is true and includeBody is false, then the S3Object.close() method will be called on exchange completion. This option is strongly related to includeBody option. In case of setting includeBody to false 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
 | *batchMessageNumber* (producer) | The number of messages composing a batch in stream mode | 10 | int
-| *batchSize* (producer) | The batch size in stream mode | 1000000 | int
+| *batchSize* (producer) | The batch size (in bytes) in stream mode | 1000000 | int
 | *deleteAfterWrite* (producer) | Delete file object after the S3 file has been uploaded | false | boolean
 | *keyName* (producer) | Setting the key name for an element in the bucket through endpoint parameter |  | 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 [...]
 | *multiPartUpload* (producer) | If it is true, camel will upload the file with multi part format, the part size is decided by the option of partSize | false | boolean
-| *namingStrategy* (producer) | The naming strategy to use. There are 2 enums and the value can be one of: progressive, random | progressive | AWSS3NamingStrategyEnum
+| *namingStrategy* (producer) | The naming strategy to use in stream mode. There are 2 enums and the value can be one of: progressive, random | progressive | AWSS3NamingStrategyEnum
 | *operation* (producer) | The operation to do in case the user don't want to do only an upload. There are 7 enums and the value can be one of: copyObject, listObjects, deleteObject, deleteBucket, listBuckets, getObject, getObjectRange |  | AWS2S3Operations
 | *partSize* (producer) | Setup the partSize which is used in multi part upload, the default size is 25M. | 26214400 | long
 | *storageClass* (producer) | The storage class to set in the com.amazonaws.services.s3.model.PutObjectRequest request. |  | String
-| *streamMode* (producer) | If StreaMode is true a different way of uploading will be provided | false | boolean
+| *streamMode* (producer) | When stream mode is true the upload to bucket will be done in streaming | false | boolean
 | *awsKMSKeyId* (producer) | Define the id of KMS key to use in case KMS is enabled |  | String
 | *useAwsKMS* (producer) | Define if KMS must be used or not | false | boolean
 | *useCustomerKey* (producer) | Define if Customer Key must be used or not | false | boolean
@@ -177,16 +177,16 @@ with the following path and query parameters:
 | *exchangePattern* (consumer) | Sets the exchange pattern when the consumer creates an exchange. There are 3 enums and the value can be one of: InOnly, InOut, InOptionalOut |  | ExchangePattern
 | *pollStrategy* (consumer) | A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your custom implementation to control error handling usually occurred during the poll operation before an Exchange have been created and being routed in Camel. |  | PollingConsumerPollStrategy
 | *batchMessageNumber* (producer) | The number of messages composing a batch in stream mode | 10 | int
-| *batchSize* (producer) | The batch size in stream mode | 1000000 | int
+| *batchSize* (producer) | The batch size (in bytes) in stream mode | 1000000 | int
 | *deleteAfterWrite* (producer) | Delete file object after the S3 file has been uploaded | false | boolean
 | *keyName* (producer) | Setting the key name for an element in the bucket through endpoint parameter |  | 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 [...]
 | *multiPartUpload* (producer) | If it is true, camel will upload the file with multi part format, the part size is decided by the option of partSize | false | boolean
-| *namingStrategy* (producer) | The naming strategy to use. There are 2 enums and the value can be one of: progressive, random | progressive | AWSS3NamingStrategyEnum
+| *namingStrategy* (producer) | The naming strategy to use in stream mode. There are 2 enums and the value can be one of: progressive, random | progressive | AWSS3NamingStrategyEnum
 | *operation* (producer) | The operation to do in case the user don't want to do only an upload. There are 7 enums and the value can be one of: copyObject, listObjects, deleteObject, deleteBucket, listBuckets, getObject, getObjectRange |  | AWS2S3Operations
 | *partSize* (producer) | Setup the partSize which is used in multi part upload, the default size is 25M. | 26214400 | long
 | *storageClass* (producer) | The storage class to set in the com.amazonaws.services.s3.model.PutObjectRequest request. |  | String
-| *streamMode* (producer) | If StreaMode is true a different way of uploading will be provided | false | boolean
+| *streamMode* (producer) | When stream mode is true the upload to bucket will be done in streaming | false | boolean
 | *awsKMSKeyId* (producer) | Define the id of KMS key to use in case KMS is enabled |  | String
 | *useAwsKMS* (producer) | Define if KMS must be used or not | false | boolean
 | *useCustomerKey* (producer) | Define if Customer Key must be used or not | false | boolean

[camel] 06/06: Camel-AWS2-S3: Better logging

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 09abcfa4e41305cf3b6be25f62629a8546130200
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Fri Apr 2 08:14:30 2021 +0200

    Camel-AWS2-S3: Better logging
---
 .../camel/component/aws2/s3/stream/AWS2S3StreamUploadProducer.java    | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/components/camel-aws/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/stream/AWS2S3StreamUploadProducer.java b/components/camel-aws/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/stream/AWS2S3StreamUploadProducer.java
index 475fec5..4a4785f 100644
--- a/components/camel-aws/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/stream/AWS2S3StreamUploadProducer.java
+++ b/components/camel-aws/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/stream/AWS2S3StreamUploadProducer.java
@@ -137,7 +137,7 @@ public class AWS2S3StreamUploadProducer extends DefaultProducer {
                         .key(dynamicKeyName).uploadId(initResponse.uploadId())
                         .partNumber(index.get()).build();
 
-                LOG.trace("Uploading part [{}] for {}", index, keyName);
+                LOG.trace("Uploading part {} at index {} for {}", part, index, keyName);
 
                 String etag = getEndpoint().getS3Client()
                         .uploadPart(uploadRequest, RequestBody.fromBytes(buffer.toByteArray())).eTag();
@@ -157,6 +157,8 @@ public class AWS2S3StreamUploadProducer extends DefaultProducer {
                                 .build();
 
                 CompleteMultipartUploadResponse uploadResult = getEndpoint().getS3Client().completeMultipartUpload(compRequest);
+                LOG.trace("Completed upload for the part {} with etag {} at index {}", part, uploadResult.eTag(),
+                        index);
                 Message message = getMessageForResponse(exchange);
                 message.setHeader(AWS2S3Constants.E_TAG, uploadResult.eTag());
                 if (uploadResult.versionId() != null) {

[camel] 05/06: Camel-AWS2-S3: Cleanup

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 8323fe155b86b791333b14ee2ad569d0ed057654
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Fri Apr 2 08:03:40 2021 +0200

    Camel-AWS2-S3: Cleanup
---
 .../camel/component/aws2/s3/stream/AWS2S3StreamUploadProducer.java       | 1 -
 1 file changed, 1 deletion(-)

diff --git a/components/camel-aws/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/stream/AWS2S3StreamUploadProducer.java b/components/camel-aws/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/stream/AWS2S3StreamUploadProducer.java
index 6c4496f..475fec5 100644
--- a/components/camel-aws/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/stream/AWS2S3StreamUploadProducer.java
+++ b/components/camel-aws/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/stream/AWS2S3StreamUploadProducer.java
@@ -126,7 +126,6 @@ public class AWS2S3StreamUploadProducer extends DefaultProducer {
         if (index.get() == 1) {
             initResponse
                     = getEndpoint().getS3Client().createMultipartUpload(createMultipartUploadRequest.build());
-            //final long contentLength = Long.valueOf(objectMetadata.get("Content-Length"));
             completedParts = new ArrayList<>();
         }
 

[camel] 04/06: Camel-AWS2-S3: Regen

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 517b7464d0db9551801aae2de9cfcf1905dcd85e
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Fri Apr 2 08:01:15 2021 +0200

    Camel-AWS2-S3: Regen
---
 .../java/org/apache/camel/component/aws2/s3/AWS2S3Producer.java   | 4 +---
 .../component/aws2/s3/stream/AWS2S3StreamUploadProducer.java      | 1 -
 .../org/apache/camel/component/aws2/s3/utils/AWS2S3Utils.java     | 8 ++++----
 3 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/components/camel-aws/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/AWS2S3Producer.java b/components/camel-aws/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/AWS2S3Producer.java
index 9ee8ecb..b908191 100644
--- a/components/camel-aws/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/AWS2S3Producer.java
+++ b/components/camel-aws/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/AWS2S3Producer.java
@@ -20,7 +20,6 @@ import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.File;
 import java.io.FileInputStream;
-import java.io.IOException;
 import java.io.InputStream;
 import java.time.Duration;
 import java.util.ArrayList;
@@ -455,7 +454,7 @@ public class AWS2S3Producer extends DefaultProducer {
             }
         } else {
             final String bucketName = AWS2S3Utils.determineBucketName(exchange, getConfiguration());
-            final String sourceKey = AWS2S3Utils.determineKey(exchange,getConfiguration());
+            final String sourceKey = AWS2S3Utils.determineKey(exchange, getConfiguration());
             GetObjectRequest.Builder req = GetObjectRequest.builder().bucket(bucketName).key(sourceKey);
             ResponseInputStream<GetObjectResponse> res = s3Client.getObject(req.build(), ResponseTransformer.toInputStream());
 
@@ -600,7 +599,6 @@ public class AWS2S3Producer extends DefaultProducer {
         return objectMetadata;
     }
 
-
     protected AWS2S3Configuration getConfiguration() {
         return getEndpoint().getConfiguration();
     }
diff --git a/components/camel-aws/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/stream/AWS2S3StreamUploadProducer.java b/components/camel-aws/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/stream/AWS2S3StreamUploadProducer.java
index 2d06bd9..6c4496f 100644
--- a/components/camel-aws/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/stream/AWS2S3StreamUploadProducer.java
+++ b/components/camel-aws/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/stream/AWS2S3StreamUploadProducer.java
@@ -17,7 +17,6 @@
 package org.apache.camel.component.aws2.s3.stream;
 
 import java.io.ByteArrayOutputStream;
-import java.io.IOException;
 import java.io.InputStream;
 import java.util.ArrayList;
 import java.util.List;
diff --git a/components/camel-aws/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/utils/AWS2S3Utils.java b/components/camel-aws/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/utils/AWS2S3Utils.java
index 7f9d669..8118ffe 100644
--- a/components/camel-aws/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/utils/AWS2S3Utils.java
+++ b/components/camel-aws/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/utils/AWS2S3Utils.java
@@ -1,14 +1,14 @@
 package org.apache.camel.component.aws2.s3.utils;
 
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+
 import org.apache.camel.Exchange;
 import org.apache.camel.component.aws2.s3.AWS2S3Configuration;
 import org.apache.camel.component.aws2.s3.AWS2S3Constants;
 import org.apache.camel.util.ObjectHelper;
 
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-
 public final class AWS2S3Utils {
 
     private AWS2S3Utils() {

[camel] 01/06: CAMEL-16185 - Improved Javadoc

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit e31e2ed76cc753a7cc934c7365229e108f088c97
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Fri Apr 2 07:28:48 2021 +0200

    CAMEL-16185 - Improved Javadoc
---
 .../org/apache/camel/component/aws2/s3/AWS2S3Configuration.java     | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/components/camel-aws/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/AWS2S3Configuration.java b/components/camel-aws/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/AWS2S3Configuration.java
index b23e312..d135306 100644
--- a/components/camel-aws/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/AWS2S3Configuration.java
+++ b/components/camel-aws/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/AWS2S3Configuration.java
@@ -589,7 +589,7 @@ public class AWS2S3Configuration implements Cloneable {
     }
 
     /**
-     * If StreaMode is true a different way of uploading will be provided
+     * When stream mode is true the upload to bucket will be done in streaming
      */
     public void setStreamMode(boolean streamMode) {
         this.streamMode = streamMode;
@@ -611,7 +611,7 @@ public class AWS2S3Configuration implements Cloneable {
     }
 
     /**
-     * The batch size in stream mode
+     * The batch size (in bytes) in stream mode
      */
     public void setBatchSize(int batchSize) {
         this.batchSize = batchSize;
@@ -622,7 +622,7 @@ public class AWS2S3Configuration implements Cloneable {
     }
 
     /**
-     * The naming strategy to use
+     * The naming strategy to use in stream mode
      */
     public void setNamingStrategy(AWSS3NamingStrategyEnum namingStrategy) {
         this.namingStrategy = namingStrategy;