Separate selection from delivery
How subscription-aware fan-out routes events to real-time clients while isolating slow or disconnected subscribers. · advanced
Subscription-aware fan-out first selects eligible recipients, then schedules an independent delivery for each. Here an application on Amazon ECS receives published events and queries a DynamoDB table for authorized topic-to-connection memberships. API Gateway supplies the WebSocket transport; it does not automatically maintain this application's topic subscriptions.
The diagram shows a deliberately explicit design for a small, stable set of durable subscribers: each has a separate SQS standard queue and Lambda delivery function. Those two cards represent repeated resources, not one shared competing-consumer queue. Publisher ingress, subscription registration, acknowledgments, and database responses are outside the drawn delivery path.
The selected services provide specific contracts. SQS supplies independently deleted work with visibility timeouts, DynamoDB supplies keyed membership records with conditional updates, and API Gateway supplies callbacks addressed by connection ID. The alternatives below do not supply those same contracts.
| Role | Selected contract | Not interchangeable |
|---|---|---|
| Membership index | DynamoDB keyed, conditional updates | S3 objects; Kinesis stream records |
| Delivery buffer | SQS visibility and deletion | SNS push; EventBridge rule delivery |
| Connection transport | API Gateway connection-ID callbacks | ALB and CloudFront proxy connections |
1 / 6 The ECS application accepts an event carrying a tenant, topic, and event ID. Its router owns recipient selection rather than sending blindly to every connected session.
AWS architecture icons are the property of Amazon Web Services. BlowStack is not affiliated with or endorsed by AWS.