Messaging basics

Pub/sub

Pub/sub is a messaging pattern in which publishers send events to named channels and subscribers receive events from the channels they follow.

Also found under: Publish/subscribe, Publisher subscriber

How it works

Publishers do not need a list of individual recipients. The messaging layer routes each publication to the current subscribers, so producing an event and consuming it remain separate concerns. Subscription access, persistence and delivery guarantees are additional design decisions; the pub/sub pattern alone does not provide them.

In a Pubb integration

A trusted backend publishes to a Pubb channel through the HTTP API or a server SDK. Browser and mobile clients subscribe over WebSockets using a public app key and, for restricted channels, backend authorization.

Publish an event

A practical example

An order service publishes order.shipped to private-user-42. Every authorized device currently subscribed to that channel can update its order view.