ExitFan-Out: one SNS topic, a queue for each consumer1 / 9
Explanationassociate9 steps · 4 exercises

Publish once, deliver to multiple queues

How a single SNS publish delivers a copy to each matching SQS subscription, so each application can buffer and process the event independently instead of competing for it on a shared queue.

Fan-out lets one event start work in several applications. An order publisher sends one message to an Amazon SNS topic instead of calling inventory and notifications separately.

Each application has its own Amazon SQS queue subscribed to the topic. SNS sends a copy to each queue whose subscription matches the message. The queues hold those copies until workers retrieve them. The arrows show where the event goes, not which way a polling request travels.

Order eventAll order eventsCreated events onlyBuffered eventBuffered event
Order publisherAWS Lambda
Order events topicAmazon Simple Notification Service (Amazon SNS)
Inventory queueAmazon Simple Queue Service (Amazon SQS)
Notification queueAmazon Simple Queue Service (Amazon SQS)
Inventory workersAmazon EC2
Notification workersAmazon EC2

Stage 1 of 6: The order publisher creates an event when an order is created or updated.

Next up: Trace a request on what you just read.

AWS architecture icons are the property of Amazon Web Services. BlowStack is not affiliated with or endorsed by AWS.