Pub/Sub Patterns
Implement the publish-subscribe pattern to decouple message producers from consumers. Learn about topic design, filtering strategies, delivery guarantees, and scaling subscriber groups.
Usage
Ask about designing pub/sub systems, choosing delivery guarantees, or implementing topic hierarchies for your messaging needs.
Examples
- "How should I design topics for my e-commerce event system?"
- "What is the difference between at-least-once and exactly-once delivery?"
- "How do I implement content-based message filtering?"
Guidelines
- Design topics around business events, not technical operations
- Use consumer groups for competing consumers that share workload
- Implement idempotent consumers to handle at-least-once delivery safely
- Consider message ordering requirements when partitioning topics
- Monitor consumer lag to detect processing bottlenecks early