This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch camel-3.14.x
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/camel-3.14.x by this push:
     new afcfc8f5871 CAMEL-16287 - camel-aws2-sqs should use pagination for 
deciding which aws sqs queues it should create
afcfc8f5871 is described below

commit afcfc8f58711f34d8f3c845fc678c706d165ca11
Author: Andrea Cosentino <[email protected]>
AuthorDate: Mon May 30 14:03:12 2022 +0200

    CAMEL-16287 - camel-aws2-sqs should use pagination for deciding which aws 
sqs queues it should create
---
 .../main/java/org/apache/camel/component/aws2/sqs/Sqs2Endpoint.java   | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git 
a/components/camel-aws/camel-aws2-sqs/src/main/java/org/apache/camel/component/aws2/sqs/Sqs2Endpoint.java
 
b/components/camel-aws/camel-aws2-sqs/src/main/java/org/apache/camel/component/aws2/sqs/Sqs2Endpoint.java
index 85d5469520b..91fdfea6d70 100644
--- 
a/components/camel-aws/camel-aws2-sqs/src/main/java/org/apache/camel/component/aws2/sqs/Sqs2Endpoint.java
+++ 
b/components/camel-aws/camel-aws2-sqs/src/main/java/org/apache/camel/component/aws2/sqs/Sqs2Endpoint.java
@@ -170,7 +170,6 @@ public class Sqs2Endpoint extends ScheduledPollEndpoint 
implements HeaderFilterS
                 while (!done) {
                     ListQueuesResponse listQueuesResult
                             = 
client.listQueues(ListQueuesRequest.builder().maxResults(1000).build());
-
                     for (String url : listQueuesResult.queueUrls()) {
                         if (url.endsWith("/" + configuration.getQueueName())) {
                             queueUrl = url;
@@ -178,11 +177,10 @@ public class Sqs2Endpoint extends ScheduledPollEndpoint 
implements HeaderFilterS
                             break;
                         }
                     }
-
                     if (listQueuesResult.nextToken() == null) {
                         done = true;
+                        continue;
                     }
-
                     String token = listQueuesResult.nextToken();
                     listQueuesResult = 
client.listQueues(ListQueuesRequest.builder().nextToken(token).build());
                 }

Reply via email to