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 2020/04/17 07:27:21 UTC

[camel] 05/06: CAMEL-14618 - Camel-aws-s3: Add an option to consumer to be able to move the consumed files to another bucket, added an example

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 132fb28bd0c4a5b6339509edeab6f33c689d792d
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Fri Apr 17 09:21:47 2020 +0200

    CAMEL-14618 - Camel-aws-s3: Add an option to consumer to be able to move the consumed files to another bucket, added an example
---
 .../camel-aws2-s3/src/main/docs/aws2-s3-component.adoc      | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/components/camel-aws2-s3/src/main/docs/aws2-s3-component.adoc b/components/camel-aws2-s3/src/main/docs/aws2-s3-component.adoc
index 65f2ddd..7c8cc4c 100644
--- a/components/camel-aws2-s3/src/main/docs/aws2-s3-component.adoc
+++ b/components/camel-aws2-s3/src/main/docs/aws2-s3-component.adoc
@@ -505,6 +505,19 @@ Some users like to consume stuff from a bucket and move the content in a differe
 If this is case for you, don't forget to remove the bucketName header from the incoming exchange of the consumer, otherwise the file will be always overwritten on the same 
 original bucket.
 
+== MoveAfterRead consumer option
+
+In addition to deleteAfterRead it has been added another option, moveAfterRead. With this option enabled the consumed object will be moved to a target destinationBucket instead of being only deleted.
+This will require specifying the destinationBucket option. As example:
+
+[source,java]
+--------------------------------------------------------------------------------
+  from("aws2-s3://mycamelbucket?amazonS3Client=#amazonS3Client&moveAfterRead=true&destinationBucket=myothercamelbucket")
+  .to("mock:result");
+--------------------------------------------------------------------------------
+
+In this case the objects consumed will be moved to myothercamelbucket bucket and deleted from the original one (because of deleteAfterRead set to true as default).
+
 == Dependencies
 
 Maven users will need to add the following dependency to their pom.xml.