Currently, from my understanding of these questions (here, and here), in AWS Messaging for Spring Boot, one has to set the queue name or queue url in the @SqsListener annotation definition as a static string that Spring can read on startup. You can't make it a variable, or a list of queues, so that you can define one method and have that one method be the handler for all of those SQS queues.
I have over 40 queues in my application. What I would like to do is take some of those queues, put them into a list, and feed that to the @SqsListener annotation so that I can have one method for those X number of queues, and put a different set of queues Y into another method's annotation. But it doesn't seem like I can do that. Is that right? Is there another way to do this?
I'm starting to not like the implementation of the spring-cloud-aws-messaging
maven package, with the @SqsListener annotation on a method that "listens" on a specific queue and calls that method when a new message comes around. Not least of which because it forces me to use 1.0 of the AWS Java SQS SDK, rather than be able to use 2.0. I'd rather manage the polling myself in spring somehow, but Idk how to do that. How can I poll a list of SQS queues in Spring Boot? I would like it if I can just configure it to long poll for like 20 seconds (the max according to AWS) and if it finds a message, it returns it and starts the next poll. Is this possible?