[ 
https://issues.apache.org/jira/browse/CAMEL-12121?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16311119#comment-16311119
 ] 

Andrea Cosentino edited comment on CAMEL-12121 at 1/4/18 10:19 AM:
-------------------------------------------------------------------

I reproduced the problem.

Since you are using the setHeader on S3 key after consumer, the consumer will 
try to delete the copy_test1.txt from the source_bucket.

If you remove that setHeader you'll see the file will be deleted from the 
source bucket.


was (Author: ancosen):
I reproduced the problem.

Since you are using the setHeader on S3 key after From, the deleteAfterRead 
will try to delete the copy_test1.txt from the source_bucket.

If you remove that setHeader you'll see the file will be deleted from the 
source bucket.

> AWS_S3 consumer unable to delect object with another S3 producer
> ----------------------------------------------------------------
>
>                 Key: CAMEL-12121
>                 URL: https://issues.apache.org/jira/browse/CAMEL-12121
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-aws
>    Affects Versions: 2.17.6
>            Reporter: Yi Yan
>            Assignee: Andrea Cosentino
>
> I want to move(copy+delete) some objects from one AWS S3 bucket to another, 
> so I created the configuration like below, the new object is copied but the 
> source object is not deleted as expected(deleteAfterRead=true).
> {code}
> from("aws-s3:source_bucket?amazonS3Client=#AWSConnection1&fileName=test1.txt&deleteAfterRead=true")
> .setHeader("CamelAwsS3Key", constant("test1_copy.txt")) 
> .setHeader("CamelAwsS3ContentLength", constant(5)) 
> .to("aws-s3:target_bucket?amazonS3Client=#AWSConnection1&includeBody=false");
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to