Skip to content
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

Error in all SQS Queue even if just one queue is not present #1060

Open
andersonfaria-hotmart opened this issue Feb 23, 2024 · 3 comments
Open
Labels
component: sqs SQS integration related issue status: waiting-for-feedback Waiting for feedback from issuer

Comments

@andersonfaria-hotmart
Copy link

Type: Bug

Component:
SQS

Describe the bug
When using many SQS queues, and one of them does not exist, spring shows an error in all queues. And the error is not explicit about the problem.

logger -> io.awspring.cloud.sqs.listener.source.AbstractPollingMessageSource
message -> Error polling for messages in queue product_sent_review
Exception ->

java.util.concurrent.CompletionException: software.amazon.awssdk.core.exception.SdkClientException: Unable to execute HTTP request: event executor terminated
	at software.amazon.awssdk.utils.CompletableFutureUtils.errorAsCompletionException(CompletableFutureUtils.java:65)
	at software.amazon.awssdk.core.internal.http.pipeline.stages.AsyncExecutionFailureExceptionReportingStage.lambda$execute$0(AsyncExecutionFailureExceptionReportingStage.java:51)
	at java.base/java.util.concurrent.CompletableFuture.uniHandle(Unknown Source)
	at java.base/java.util.concurrent.CompletableFuture.uniHandleStage(Unknown Source)
	at java.base/java.util.concurrent.CompletableFuture.handle(Unknown Source)

product_sent_review exists and works properly, but the application expects a queue "producer_to_exclude" that doesn't exists

Sample
Configure 3 sqs queues and 1 of them does not exists. The error will appear.

@tomazfernandes
Copy link
Contributor

If a queue doesn't exist and cannot be created, the app won't start, which seems the correct behavior since it won't be able to comply with what it's been configured to do.

Can you share your reasoning for wanting the app to start even though it's configured to listen for a queue that doesn't exist?

@tomazfernandes tomazfernandes added the component: sqs SQS integration related issue label Feb 26, 2024
@andersonfaria-hotmart
Copy link
Author

My point is not to start the app, is about the logs. The logs show errors in all queues and not only in the queue that doesn't exist which makes it difficult to understand what is happening. The spring should show an error only in the queue with some problem.

@tomazfernandes
Copy link
Contributor

Oh, I see.

The problem there is that the AWS SDK Task Executor is being shut down before the container has the chance to stop polling, so not sure if we can really do something about it.

Can you check the logs to see if the original error QueueDoesNotExistException or Error creating queue appears somewhere?

Thanks.

@tomazfernandes tomazfernandes added the status: waiting-for-feedback Waiting for feedback from issuer label Mar 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: sqs SQS integration related issue status: waiting-for-feedback Waiting for feedback from issuer
Projects
None yet
Development

No branches or pull requests

2 participants