Redis Pub/Sub & Streams
Build messaging on Redis: Pub/Sub, sharded channels, keyspace events, Streams, consumer groups, XACK and XAUTOCLAIM, trimming, durability and monitoring.
What you'll learn
- Choose between Redis Pub/Sub, lists and Streams, and know when a dedicated broker is a better fit.
- Use Pub/Sub, pattern and sharded subscriptions, keyspace notifications and real-time backplanes safely.
- Model data in streams with IDs, ranges, blocking reads and trimming.
- Process streams reliably with consumer groups, acknowledgements, pending entry recovery and dead-lettering.
- Design job queues, outbox-driven event streams and partitioned streams for scale.
- Operate Redis messaging with the right persistence, replication, memory sizing and monitoring.
Syllabus
Messaging with Redis
- Three Messaging Tools in One Server
- Running Redis and Using redis-cli
- Choosing Between Pub/Sub, Lists, Streams and a Broker
Redis Pub/Sub
- PUBLISH and SUBSCRIBE
- Pattern Subscriptions and Common Uses
- Limits: Slow Subscribers, Reconnects and Scale
Advanced Pub/Sub: Cluster, Keyspace Events and Real-Time Apps
Redis Streams Fundamentals
Consumer Groups
- Creating Groups and Reading with XREADGROUP
- Acknowledgements and the Pending Entries List
- Recovering Stuck Messages and Dead Letters
Design Patterns with Streams
Durability, Monitoring and Operations
- Persistence, Replication and Data Loss
- Monitoring Streams and Consumer Groups
- Memory Sizing and Performance