Reputation: 41
Just a question about AWS Lambda and SQS:
Can we set up multiple lambdas to consume different events from one SQS queue based on event type. For example: reporting events to be consumed by reporting lambda and registration events to be consumed by registration lambda.
Or should set up different queues for different events which will be hard to maintain as there can be multiple events.
Any Thoughts?
Upvotes: 2
Views: 1523
Reputation: 238051
Unfortunately, you can't choose which messages you are going to get in your lambda function. You can only ignore "wrong messages" in your function, or write if-else
type logic to process different messages in a different way.
The better technique is to have different queues for different message types along with the corresponding functions.
Upvotes: 1