Protocols
Saved & recent

Publish–subscribe

Also called: pub/sub, pubsub

Publish–subscribe is a communication pattern in which publishers send messages without naming each recipient. Subscribers express interest in a topic, channel, or other selection rule, and the messaging system distributes matching messages. It is a pattern supported by several protocols, not a single wire format.

For example, an order-created event can reach a notification service and an analytics service independently. That differs from competing workers sharing one queue, where a delivery is assigned to one worker. Whether disconnected subscribers later receive events depends on subscriptions, retention, and the chosen system’s guarantees.

Related
Message broker, MQTT, Delivery semantics
Further reading
RabbitMQ tutorial — Publish/Subscribe
publisher publish messaging system order created event copy event copy notifications analytics separate subscriptions hypothetical publication
Hypothetical order-created event reaches two separate subscriptions, notifications and analytics. Each receives a copy in this example. This is different from workers competing within one consumer group; offline retention depends on the system.

View in the full Protocols collection