# Durable Subscriber

> Go offline, come back — your messages will be waiting. No missed events.

- **Category**: Integration
- **Subcategory**: Messaging Endpoints
- **Canonical URL**: https://designpattern.fyi/patterns/durable_subscriber/

---

## Description
Clean, reusable architecture pattern.


## Use Cases
Inventory sync service with scheduled maintenance windows — durable subscription to ProductUpdated events. During 2-hour maintenance, 500 product updates are published. On restart, inventory service receives all 500 queued events and syncs to current state before going live. Zero missed updates.





## Trade-offs


### Advantages

- No message loss during planned or unplanned downtime

- Transparent catch-up on reconnect — subscriber processes missed messages automatically

- Enables scheduled maintenance without data loss

- Reliable delivery guarantee for critical event subscribers




### Considerations & Drawbacks

- Broker must store messages during absence — storage cost grows with offline duration

- Slow or never-reconnecting subscribers create unbounded message backlogs

- Catch-up processing can be slow and delay real-time event processing after restart

- Subscription lifecycle management (cleanup of abandoned durable subs) is needed







---
**Reference**: [Original Source](https://www.enterpriseintegrationpatterns.com/patterns/messaging/DurableSubscription.html)

