Skip to content

Publish-subscribe

The publish-subscribe pattern provides an event bus (message broker) where publishers can send messages and subscribers can receive them. One like the other don't have a knowledge of who are the publishers/subscribers, they just interact with this common repository.

It's similar to the Blackboard architecture, but events are shared instead of data. It's also similar to observer pattern, but the publishers don't have to maintain a list of subscriber, which is handled by the event bus.