Redis › Pub/Sub
What happens to a message published on a channel if there are currently no subscribers listening to that channel?
IntermediateAnswer
If no client is currently subscribed to a channel when a message is published, that message is simply lost forever and never delivered to anyone, since Redis Pub/Sub does not store or queue messages for later delivery, which is an important limitation to understand before relying on Pub/Sub for anything that requires guaranteed delivery.
PUBLISH orders 'New order 456' -- lost if no subscribers are currently listeningReal-world example A team initially used Pub/Sub for order notifications, then discovered orders were being silently missed whenever their notification service briefly restarted, prompting them to switch to Redis Streams for guaranteed delivery instead.