🔷
SNS + SQS: Fan-Out Pattern
- Publish a message once to an SNS Topic, and it is delivered to all subscribed SQS queues.
- Enables a fully decoupled, reliable architecture with no data loss.
- SQS ensures:
- Persistent message storage.
- Delayed or scheduled processing.
- Automatic retries for failed processing.
Benefits
- Easily add new SQS subscribers without modifying the producer.
- SQS access policies must permit the SNS topic to publish to the queues.
- Supports cross-region delivery, allowing SNS to send messages to SQS queues in other AWS regions.