Pub/sub
Publish one message; every subscriber gets its own copy.
10 technologies on this page ↓How it works
A publisher sends a message to a topic without knowing who’s listening. The broker delivers a copy to every current subscriber. Adding a consumer means adding a subscription, with no change to the publisher. Plain pub/sub keeps no history, so an offline subscriber misses messages unless its subscription is backed by a durable queue.
A group chat. You post once and everyone in the group sees it, but people who join later don’t see what was said before.
Reach for it when
- Fan-out: one event triggers several independent reactions
- Decoupling teams, since publishers don’t need to know about consumers
- Device messaging over MQTT, where each device subscribes to its own topics
Think twice when
- Work that one worker must do exactly once; that’s a queue
- Consumers that need to replay history; that’s a stream
A real example
When an order is placed, one OrderPlaced message fans out to email, analytics and inventory. A year later the fraud team subscribes too, and the order service doesn’t change at all.
More on pub/sub
Narrower ideas that build on this one.
Technologies
Specific products, and what each does differently.
Amazon SNS | Managed service on AWS | Amazon Web Services | Proprietary | 2026-10-05 |
| Managed service on Google Cloud | Google Cloud | Proprietary | 2026-10-05 |
Also used for pub/sub
Products of other kinds that are often used this way, grouped by what they are.
RedpandaCommercialA Kafka-compatible streaming broker rewritten in C++ as one binary, with no JVM and no ZooKeeper.
WarpStreamCommercialA Kafka-compatible stream that keeps no data on disks: stateless Agents write straight to your object storage bucket.| Message queues | Open source | Broadcom | MPL 2.0 | 2026-10-05 | |
| Event streams | Open source | Apache Software Foundation | Apache 2.0 | 2026-10-05 | |
| Event streams | Open source | Apache Software Foundation | Apache 2.0 | 2026-10-08 | |
| Event streams | Commercial product | Cloudflare, Inc. | Proprietary | 2026-10-12 | |
Redpanda | Event streams | Commercial product | Redpanda Data | BSL 1.1 (each release becomes Apache 2.0 after four years); enterprise features under the Redpanda Community License | 2026-10-05 |
WarpStream | Event streams | Commercial product | Confluent (an IBM company) | Proprietary (the embedded Bento pipeline engine is MIT) | 2026-10-05 |
Eclipse ZenohIncubating | IoT device messaging | Open source | Eclipse Foundation; developed mainly by ZettaScale Technology | Dual-licensed: EPL 2.0 or Apache 2.0 | 2026-10-06 |
| IoT device messaging | Open source | OASIS (open standard) | Open standard, free to implement: OASIS Non-Assertion IPR mode; 3.1.1 is also ISO/IEC 20922 | 2026-10-06 |
What each provider calls it
- AWS
- SNS, IoT Core (MQTT)
- Google Cloud
- Pub/Sub
- Azure
- Service Bus topics, Web PubSub, Event Grid MQTT broker
- Open source & others
- MQTT (Mosquitto, EMQX, HiveMQ), Zenoh, NATS, Redis Pub/Sub
In code · python
import boto3, json
sns = boto3.client("sns")
sns.publish(
TopicArn="arn:aws:sns:us-east-1:123456789012:orders",
Message=json.dumps({"type": "OrderPlaced", "order_id": 4812}),
)
# Email, analytics and inventory each subscribe to the topic,
# usually through their own SQS queue so nothing is lost.Often confused with
Where it came from1985–2019
Publish/subscribe grew up in the mid-1980s, on trading floors and in research labs. Trading rooms needed stock quotes and news on many screens the moment they changed. Vivek Ranadivé’s Teknekron Software Systems, founded in 1985, built an “Information Bus” that delivered that information as it became available, and its successor, TIBCO, carried the idea into enterprises. At Cornell, Ken Birman’s Isis toolkit, released in 1987, included a topic-based “news” service written by Frank Schmuck, which Birman calls “the first widely used publish-subscribe solution.”
In 1999 Andy Stanford-Clark of IBM and Arlen Nipper wrote MQTT to monitor oil pipelines over expensive satellite links, taking pub/sub to small devices on poor networks. Cloud providers later offered topics as a service: Amazon SNS in 2010, and Google Cloud Pub/Sub in 2015, built on infrastructure Google’s own products use for over 500 million messages per second.
The lines have since blurred. Durable subscriptions turn a topic into a set of queues, logs such as Kafka add replay, and MQTT, an OASIS standard since 2014, is widely used for device telemetry.
Why it’s built this way
- Publishers address topics, not receivers
- A sender doesn’t know who is listening, so new consumers can be added years later without changing the publisher.
- Many topics mapped onto few channels
- One group per topic created huge numbers of groups, so Isis mapped topics onto a few groups and filtered at the receiver, an approach Birman notes is still common in pub/sub products.
- Deliver to whoever is subscribed now
- Classic pub/sub keeps nothing, which keeps latency low. Systems that can’t lose messages put a durable queue behind each subscription.
- Tiny messages for costly links (MQTT)
- MQTT’s control messages can be as small as two bytes, because its first users paid for satellite bandwidth from remote pipelines.
Timeline
- 1985
Teknekron Software Systems founded; builds the Information Bus for trading rooms
- 1987
Cornell’s Isis toolkit released, with a topic-based “news” service
- 1999
MQTT written to monitor oil pipelines over satellite
- 2010
Amazon SNS brings managed topics to the cloud
- 2014
OASIS publishes MQTT 3.1.1 as a standard
- 2015
Google Cloud Pub/Sub becomes generally available
- 2019
MQTT 5 released
- Ken Birman: A History of the Virtual Synchrony Replication Model
- Encyclopedia.com: TIBCO Software Inc. company history
- MQTT.org FAQ: who invented MQTT (1999)
- HiveMQ: MQTT Essentials, introducing MQTT (oil pipelines over satellite)
- OASIS: MQTT Version 3.1.1 becomes an OASIS Standard (Oct 2014)
- OASIS: MQTT Version 3.1.1 specification (fixed header and control packets)
- OASIS: MQTT Version 5.0 specification (Mar 2019)
- Amazon press release: AWS introduces Amazon SNS (Apr 2010)
- Google Cloud Platform blog: General availability of Cloud Dataflow and Cloud Pub/Sub (Aug 2015)
- Google Cloud docs: Pub/Sub architectural overview
Sources12
- AWS docs: What is Amazon SNS?
- AWS docs: Fanout Amazon SNS notifications to Amazon SQS queues
- AWS docs: MQTT in AWS IoT Core
- Google Cloud docs: Choose a Pub/Sub subscription type
- Microsoft Learn: Service Bus queues, topics and subscriptions
- Microsoft Learn: What is Azure Web PubSub?
- Eclipse Mosquitto: an open-source MQTT broker
- EMQX documentation
- NATS docs: Publish-subscribe
- Redis docs: Pub/Sub (at-most-once delivery)
- Azure docs: Event Grid MQTT broker overview
- Zenoh docs: What is Zenoh?

