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

davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/main by this push:
     new ca4452f2345 CAMEL-21550: start the extender before visibility
ca4452f2345 is described below

commit ca4452f23458760d143a9c4d24d94eb01f23e4b4
Author: Claus Ibsen <claus.ib...@gmail.com>
AuthorDate: Wed Dec 18 11:36:46 2024 +0100

    CAMEL-21550: start the extender before visibility
---
 .../org/apache/camel/component/aws2/sqs/Sqs2Consumer.java     | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git 
a/components/camel-aws/camel-aws2-sqs/src/main/java/org/apache/camel/component/aws2/sqs/Sqs2Consumer.java
 
b/components/camel-aws/camel-aws2-sqs/src/main/java/org/apache/camel/component/aws2/sqs/Sqs2Consumer.java
index c170a2c75fa..6fd18faa640 100644
--- 
a/components/camel-aws/camel-aws2-sqs/src/main/java/org/apache/camel/component/aws2/sqs/Sqs2Consumer.java
+++ 
b/components/camel-aws/camel-aws2-sqs/src/main/java/org/apache/camel/component/aws2/sqs/Sqs2Consumer.java
@@ -404,14 +404,15 @@ public class Sqs2Consumer extends 
ScheduledBatchPollingConsumer {
                                     .build();
 
                     try {
-                        LOG.trace("Extending visibility window by {} seconds 
for request entries {}", repeatSeconds,
+                        LOG.trace("Extending visibility window by {} seconds 
for request entries: {}", repeatSeconds,
                                 batchEntries);
                         ChangeMessageVisibilityBatchResponse br
                                 = 
getEndpoint().getClient().changeMessageVisibilityBatch(request);
-                        LOG.debug("Extended visibility window for request 
entries successful {}", br.successful());
-                        LOG.debug("Extended visibility window for request 
entries failed {}", br.failed());
-                    } catch (SqsException e) {
-                        logException(e, batchEntries);
+                        if (br.hasFailed()) {
+                            LOG.warn("Extended visibility window for request 
entries failed: {}", br.failed());
+                        } else {
+                            LOG.debug("Extended visibility window for request 
entries successful: {}", br.successful());
+                        }
                     } catch (SdkException e) {
                         logException(e, batchEntries);
                     }

Reply via email to