spring-cloud-aws icon indicating copy to clipboard operation
spring-cloud-aws copied to clipboard

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

Open andersonfaria-hotmart opened this issue 1 year ago • 3 comments

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.

andersonfaria-hotmart avatar Feb 23 '24 18:02 andersonfaria-hotmart

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 avatar Feb 26 '24 23:02 tomazfernandes

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.

andersonfaria-hotmart avatar Feb 27 '24 11:02 andersonfaria-hotmart

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 avatar Feb 28 '24 00:02 tomazfernandes

Closing due to lack of feedback.

tomazfernandes avatar Aug 18 '24 04:08 tomazfernandes