Copies across subscribers, competition within a queue
How publishing to independent subscribers differs from buffering messages for competing consumers, and when an architecture needs both services. · advanced
Amazon SNS distributes a publication to independent subscriptions. Each matching subscription is a separate delivery destination, not a worker competing for ownership of the publication. Subscription filters can select different subsets; without filters, each subscription is eligible for every publication.
Amazon SQS holds a backlog that consumers poll. Workers sharing one queue compete for available messages; adding workers shares the work rather than giving every worker a copy. Receiving temporarily hides a message, and the consumer deletes it after successful processing.
The distinction is independent work versus shared work, not simply many consumers versus one. Standard queues can deliver duplicates, so competition does not mean guaranteed exclusive or exactly-once execution. Consumers still need idempotent processing.
| Dimension | Amazon SNS | Amazon SQS |
|---|---|---|
| Distribution unit | Subscription | Queue |
| Consumer relationship | Independent destinations | Competing workers |
| Message movement | Delivery to endpoints | Consumer polling |
| Completion boundary | Endpoint acceptance | Consumer deletion |
AWS architecture icons are the property of Amazon Web Services. BlowStack is not affiliated with or endorsed by AWS.