camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen (JIRA)" <>
Subject [jira] [Commented] (CAMEL-8539) S3 marker does not work
Date Thu, 09 Jul 2015 10:36:04 GMT


Claus Ibsen commented on CAMEL-8539:

Wonder what kind of solution could be done then? Is there not a api to peek / know if we are
at the end?

> S3 marker does not work
> -----------------------
>                 Key: CAMEL-8539
>                 URL:
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-aws
>    Affects Versions: 2.15.0
>            Reporter: Alexey Hanin
> S3Consumer doesn't set marker correctly, when {{deleteAfterRead}} is set to {{false}}.
Therefore, on every subsequent poll, it starts from the beginning of the list.
> The reason for that is the following code in S3Consumer:
> {code:lang=java|}
>             if (!getConfiguration().isDeleteAfterRead()) {
>                 // where marker is track
>                 marker = listObjects.getMarker();
>             }
> {code}
> Accordingly to S3 client documentation, {{getMarker()}} return a marker previously set
in request. Instead, {{getNextMarker()}} shall be used. Although, simply changing it to use
{{getNextMarker()}} introduces an endless loop iterating over the same set of keys under the
prefix, because when reached the end of the key set, {{getNextMarker()}} returns {{null}},
and on the next poll, the head of the list will be returned, and so on.

This message was sent by Atlassian JIRA

View raw message