One event, two kinds of delivery
Why workers sharing a queue compete to handle each message, while publish-subscribe gives each matching subscription its own delivery.
An image application reports uploads and metadata changes. Search indexing needs to see both. Thumbnail generation only needs uploads, and either of two identical thumbnail workers can do the job. That gives us two separate questions: Which applications need the event? and Which worker will do the work?
An Amazon SNS topic answers the first question by delivering to matching subscriptions. An Amazon SQS queue answers the second by holding work for workers to claim. The arrows show where messages travel, including messages returned when workers poll.
Stage 1 of 6: The publisher creates an event for each image upload or metadata change.
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.