ExitAmazon SNS vs Amazon SQS: fan-out versus queued consumption1 / 9
Explanation

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.

DimensionAmazon SNSAmazon SQS
Distribution unitSubscriptionQueue
Consumer relationshipIndependent destinationsCompeting workers
Message movementDelivery to endpointsConsumer polling
Completion boundaryEndpoint acceptanceConsumer deletion

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