publish-subscribe

A messaging pattern where senders publish messages to a named channel and every subscriber listening on that channel receives a copy.

In more detail

Publishers do not need to know who is listening, and subscribers can come and go. It is used for broadcasting events such as cache invalidations or chat messages.

Example

A server publishes “evict item 1” on a Redis channel and every instance drops it from its local cache.

Related terms

Taught in

References