Closed ankurraiyani closed 1 year ago
Hi @ankurraiyani.
This is odd, we have plenty of tests asserting this behavior works.
Can you share more of your stack trace? It would also help if you could create a minimal sample project that reproduces the behavior you're seeing.
Thanks.
@ankurraiyani do you use DevTools by any chance?
Yes I do have that dependency. @maciejwalkowiak I've updated the question and added the pom.xml file
Hi @tomazfernandes
I have updated the stacktrace in question and here I have attached the project as well which is POC. Please let me know if you need any additional details.
Thanks spring-aws-sqs.zip
@maciejwalkowiak @tomazfernandes Have you get a chance to look into this issue?
I am pretty sure this issue is caused by Devtools. Unfortunately this is not something we figured out how to solve. Can you try running your code without devtools?
Hey @maciejwalkowiak !
I have commented out the spring-boot-devtools
dependency and yes it worked ! 😄
I am really sorry it works that way. I got also burned by this problem. Spring Boot Devtools is sometimes disappointing - it works until it doesn't. We have similar issue with DynamoDB.
Are there any updates? I ran into the same issue with dev-tools enabled. Would it work using the SqsTemplate to receive messages instead of the @SqsListener?
No updates. If you figure out a workaround - contributions welcome - either as a code change or guidelines in docs.
Would it work using the SqsTemplate to receive messages instead of the @SqsListener?
It should work, but I'd definitely advise against changing production code for DevTool's sake.
I am using
spring-cloud-aws-starter-sqs
, version3.0.1
withspring-boot-starter-parent
, version3.0.6
I have just 2 classes in my sample project. The main application class looks like below
The AWS SQS Service class looks like below
The
application.properties
is as belowThe message is being sent successfully but for SqsListner I am getting below error message. I tried difference solutions available from different articles but most of them are either for version 2.x.x or not solving the issue.
Full StackTrace is as below
pom.xm file is as below
Please guide and let me know if any additional information is required