-
-
Notifications
You must be signed in to change notification settings - Fork 312
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
Spring Boot 3.2.2 @SqsListener Not listening to the Queue #1028
Comments
Hi @WoodenCode00, would you be able to create and share a sample application that reproduces the issue without the @PostConstruct annotation? Thanks. |
Let me see... Interesting that in the new clean project the |
I couldn't reproduce the issue in a new project. As a workaround, I refactored the code to create a bean of |
@WoodenCode00 since it seems you solved your problem, I'll close this issue. We can reopen it if you'd like and feel free to provide more details on your configuration if you want to investigate this further. Thanks. |
I had the same issue and found the root cause here: https://stackoverflow.com/questions/75181017/aws-sqslistener-not-working-with-spring-cloud-using-springboot-3 In short, use io.awspring.cloud.sqs.annotation.SqsListener to listen the messages instead of io.awspring.cloud.messaging.listener.annotation.SqsListener. |
@fsamir thanks for your comment. I checked my old code, I did use the io.awspring.cloud.sqs.annotation.SqsListener annotation, still didn't work. Maybe you got a different flavor of the problem. |
Type: Bug
Component: SQS
Describe the bug
After upgrading from Spring Boot 2.7.18 to 3.2.2 the
@SqsListener
annotation doesn't listen to the SQS queue. I made some experimentations, for example, I added@PostConstruct
method to the class with a simple logger, and I can see that the log doesn't get printed. Interesting that after adding a@Scheduled(fixedRate = 5000)
on the method in this class, all of a sudden the log message from PostConstruct comes out and SqsListener method starts to consume the messages.Another fact, the below log statement is not printed, though I can see it after adding
@Scheduled
method:2024-01-19 17:40:48.546 [lifecycle-thread-1] INFO io.awspring.cloud.sqs.listener.AbstractMessageListenerContainer.start - Container io.awspring.cloud.sqs.sqsListenerEndpointContainer#0 started
Sample
UPDATE: versions used:
UPDATE: output of bean resolutions - all looks normal, though the queue is not getting polled:
The text was updated successfully, but these errors were encountered: