oscerd commented on code in PR #9233:
URL: https://github.com/apache/camel/pull/9233#discussion_r1089206210


##########
components/camel-aws/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/AWS2S3Producer.java:
##########
@@ -562,7 +562,13 @@ private void listObjects(S3Client s3Client, Exchange 
exchange) throws InvalidPay
                 message.setBody(objectList.contents());
             }
         } else {
-            ListObjectsResponse objectList = 
s3Client.listObjects(ListObjectsRequest.builder().bucket(bucketName).build());
+            final ListObjectsRequest listObjectsRequest = ListObjectsRequest
+                    .builder()
+                    .bucket(bucketName)
+                    .delimiter(getConfiguration().getDelimiter())

Review Comment:
   I would add a guard to check if the delimiter is set on the configuration, 
same for the prefix, otherwise setting them on the request doesn't make sense. 
Also it would be a good idea to have a way to provide this parameter as 
headers, for being a bit more dynamic.
   
   You need also to modify 
https://github.com/apache/camel/blob/main/components/camel-aws/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/AWS2S3Configuration.java#L45-L48
    
   and remove the label consumer, since now they are common.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to