# Publish-Subscribe

> Enable applications to announce events to multiple consumers asynchronously

- **Category**: Cloud
- **Subcategory**: aws
- **Canonical URL**: https://designpattern.fyi/patterns/aws_publish_subscribe/

---

## Description
The Publish-Subscribe pattern enables an application to announce events to multiple consumers asynchronously, without coupling senders to receivers. Publishers send messages to topics, and subscribers receive messages from topics they are interested in. This provides loose coupling between components and enables fan-out messaging.


## Use Cases
Use when you need to send the same message to multiple consumers or when you want to decouple publishers from subscribers in event-driven architectures.





## Trade-offs


### Advantages

- Loose coupling between publishers and subscribers

- Fan-out messaging capability

- Scalable to many consumers

- Natural fit for event-driven architectures




### Considerations & Drawbacks

- Message ordering challenges

- No guaranteed delivery

- Requires message broker infrastructure







---
**Reference**: [Original Source](https://docs.aws.amazon.com/prescriptive-guidance/latest/cloud-design-patterns/publish-subscribe.html)

