You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Vishal K (JIRA)" <ji...@apache.org> on 2015/06/30 23:38:04 UTC

[jira] [Comment Edited] (CAMEL-8431) Consume all files in aws S3 bucket where deleteAfterRead = false

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

Vishal K edited comment on CAMEL-8431 at 6/30/15 9:37 PM:
----------------------------------------------------------

I faced a similar problem with the' deleteAfterRead = false' argument in my aws-s3 uri. I am using camel-2.14.1. As per the suggestions, I changed my pom to use camel-2.14.3 and camel-2.15.0 but the issue still exists. The same file keeps on getting consumed again and again. This is what my uri looks like :
asw-s3//{bucketname}?accessKey={$accessKey}&secretKey={$secretKey}&deleteAfterRead=false&prefix={$prefix}


was (Author: vish1128):
I faced a similar problem with the' deleteAfterRead = false' argument in my aws-s3 uri. I am using camel-2.14.1. As per the suggestions, I changed my pom to use camel-2.14.4 and camel-2.15.0 but the issue still exists. The same file keeps on getting comsumed again and again. This is what my uri looks like :
asw-s3//{bucketname}?accessKey={$accessKey}&secretKey={$secretKey}&deleteAfterRead=false&prefix={$prefix}

> Consume all files in aws S3 bucket where deleteAfterRead = false
> ----------------------------------------------------------------
>
>                 Key: CAMEL-8431
>                 URL: https://issues.apache.org/jira/browse/CAMEL-8431
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-aws
>    Affects Versions: 2.14.0
>            Reporter: Yap Poh Soon
>            Assignee: Willem Jiang
>             Fix For: 2.13.4, 2.14.3, 2.15.0
>
>
> The current AWS S3Consumer class has a problem if user supply the parameter deleteAfterRead=false.  The S3Consumer will always consume the same files over and over again with the size of getMaxMessagesPerPoll(). 
> After some code chasing, i think, the root cause is because the ListObjectsRequest does not has the previous marker value. Hence, i wonder if we could do something like below:
> {quote}
> {color:blue}private string marker; // new line to define the marker string {color}
> ..
> ..
> ..
> ListObjectsRequest listObjectsRequest = new ListObjectsRequest();
> listObjectsRequest.setBucketName(bucketName);
> listObjectsRequest.setPrefix(getConfiguration().getPrefix());
> listObjectsRequest.setMaxKeys(maxMessagesPerPoll);
> {color:blue}listObjectsRequest.setMarker(marker); // new line to set the marker  {color}     
> ObjectListing listObjects = getAmazonS3Client().listObjects(listObjectsRequest);
> {color:blue}marker = listObjects.getMarker(); // where marker is track          
> {color}{quote}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)