spring-attic / spring-cloud-aws

All development has moved to https://github.com/awspring/spring-cloud-aws Integration for Amazon Web Services APIs with Spring
https://awspring.io/
Apache License 2.0
589 stars 376 forks source link

Dynamically modify SQS queue to an @SqsListener method at runtime ? #789

Open naveen-rd opened 2 years ago

naveen-rd commented 2 years ago
    @SqsListener(value = "foo", deletionPolicy = SqsMessageDeletionPolicy.ON_SUCCESS)
    public void fooMethod(final String message)  {
        processEvents(message);
    }

I am using SqsListener which at the app startup loads foo queue just fine. But while the app is up and running processing events from the queue, if I want to change the queue to a different queue, say foo-test, does spring-cloud support it ?

Background: I am trying to run a test queue part of my deployment and the deployment would start with the test queue. Once messages from the test queue are processed and test is successful, I want to dynamically change the queue to the production queue.

Please advise on how to achieve this. If there are alternative approaches, let me know. Thanks!