Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-8539

S3 marker does not work

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 2.15.0
    • None
    • camel-aws
    • None
    • Novice

    Description

      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:

      S3Consumer.java
                  if (!getConfiguration().isDeleteAfterRead()) {
                      // where marker is track
                      marker = listObjects.getMarker();
                  }
      

      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.

      Attachments

        1. 8539.patch
          2 kB
          James Lindstorff

        Issue Links

          Activity

            People

              Unassigned Unassigned
              ahanin Alexey Hanin
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: