Say I want to send emails to users.
- When users sign up for an account they get an email.
- When they complete an order they get an email.
- When they receive a message they get an email.
My hunch is that a event Fanout is a good approach to use here. Say I have multiple SNS topics e.g. orders
, users
, messages
. Each topic has their respective events e.g. order_created
, user_created
, message_created
.
My question is which one to choose:
- Create a single queue that subscribes to all of these topics with an attached worker that will send the appropriate email based on the event
- Create a separate queue for each of these topics where the attached worker only sends a specific email
I am having a hard time identifying obvious pros / cons. Also more generally what are scenarios where you would have one queue subscribe to multiple topics vs multiple queues each subscribed to a single topic.
Thanks!