Skip to content
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

Listen to two SQS queue from same springboot app #406

Open
satheesh83 opened this issue Feb 6, 2024 · 1 comment
Open

Listen to two SQS queue from same springboot app #406

satheesh83 opened this issue Feb 6, 2024 · 1 comment

Comments

@satheesh83
Copy link

In order to listen to two different SQS queues(same aws account) from same springboot application.
Can we use one single SqsAsyncClient and have 2 @QueueListener methods or
Do we need to follow https://github.com/JaidenAshmore/java-dynamic-sqs-listener/tree/6.x/examples/spring-multiple-aws-a
ccount-example even for listening to 2 queues from same account?

@JaidenAshmore
Copy link
Owner

Nah that is only for the case where you have two different AWS accounts. If you are using the same AWS account you can just do the 2 annotations with each pointing to a different queue. Here is an example of that: https://github.com/JaidenAshmore/java-dynamic-sqs-listener/blob/6.x/examples/spring-starter-example/src/main/java/com/jashmore/sqs/examples/MessageListeners.java

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants