-
-
Notifications
You must be signed in to change notification settings - Fork 311
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Caused by: java.util.concurrent.CompletionException: io.awspring.cloud.sqs.QueueAttributesResolvingException: Error resolving attributes for queue <queue_name>.fifo with strategy CREATE and queueAttributesNames [] #1283
Comments
Error messages like that - either are self explanatory - or are related with your infrastructure/IAM permissions. If you believe this is in any way caused by framework, please provide a minimum sample that reproduces this issue. |
@maciejwalkowiak To isolate the issue, I created a minimal reproducible example using version 3.2.1 of io.awspring.cloud:spring-cloud-aws-sqs. Here’s the reduced code sample that reproduces the issue: listener class: @service
}` error i got: The @SqsListener should connect to the specified FIFO queue (example-queue.fifo) and process messages without attempting to recreate the queue. note when adding createQueue permission to my user it successfully connected to the existing queue (without creating a new queue) note: I noticed that when putting full SQS url in the @SqsListener(value = "https://sqs.eu-north-1.amazonaws.com/account-id/example-queue.fifo") it does connect successfully to queue and does not try to create queue |
Hi @ohadab. The only condition the framework tries to create the queue is if it gets a So, for some reason, it's not finding the queue in your setup. If you could provide a minimal sample that reproduces the issue we could take a look at it. You can also add a breakpoint in the Lines 107 to 127 in 425b6c8
Let me know if that works for you, thanks. |
Type: Bug
Component:
SQS
Describe the bug
using package io.awspring.cloud:spring-cloud-aws-sqs:3.2.1
and using @SqsListener(value = "queue-messages.fifo")
i'm getting exception:
Caused by: java.util.concurrent.CompletionException: io.awspring.cloud.sqs.QueueAttributesResolvingException: Error resolving attributes for queue queue-messages.fifo with strategy CREATE and queueAttributesNames []
.....
at java.base/java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:2194)
at software.amazon.awssdk.core.internal.http.pipeline.stages.AsyncApiCallMetricCollectionStage.lambda$execute$0(AsyncApiCallMetricCollectionStage.java:56)
at java.base/java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:863)
at java.base/java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(CompletableFuture.java:841)
at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:510)
at java.base/java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:2194)
at software.amazon.awssdk.core.internal.http.pipeline.stages.AsyncApiCallTimeoutTrackingStage.lambda$execute$2(AsyncApiCallTimeoutTrackingStage.java:67)
.....
Caused by: software.amazon.awssdk.services.sqs.model.SqsException: The action CreateQueue is not valid for this endpoint. (Service: Sqs, Status Code: 400, Request ID: <req_id>
)
Sample
@SqsListener(queueNames = {"queue-messages.fifo"})
public void handleMessage(QueueMessageEvent event) {
The text was updated successfully, but these errors were encountered: