Use Cases
- Distributing workloads—distribute tasks between workers
- Asynchronous workflows—e.g. order fulfilment
- Distributing event notifications—alert other services that something has happened, e.g. order placed
- Distributed logging—distribute to log archives, analytics etc.
- Data device streaming—IoT, consumed on demand
- Increases resilience of applications—loose coupling between services
Pub/Sub Patterns
One-to-One
One-to-Many
Each Subscriber Receives a Copy of Every Message
Round Robin Message Delivery
Many-to-Many
Many-to-One
Subscription Types
- Pull—subscriber makes request via subscription to check for new messages
- Push—auto send messages to HTTP endpoint