Concept
Publish/subscribe (pub/sub)
Publish/subscribe is an asynchronous messaging pattern where senders publish to topics and receivers subscribe, via a broker that decouples both.
Publish/subscribe (pub/sub) is a messaging pattern in which senders, called publishers, send messages to a named channel, the topic, instead of to specific receivers. A broker or messaging service delivers each message to every subscriber registered for that topic, so publishers and subscribers never need to know about each other. MQTTProtocolMQTTThe standard pub/sub protocol of IoTView profile and Google Cloud Pub/Sub are both built on it.
How publish/subscribe works
Publishers produce messages, subscribers declare which topics they want, and the broker matches the two. A temperature sensor publishes to a topic such as plant1/line2/temperature; a dashboard and a historian can each subscribe to it without any change on the sensor.
That decoupling has practical effects:
- The publisher needs only the topic name, not the address of each subscriber.
- One message can reach many subscribers, and you can add new consumers without touching the publisher.
- Communication is asynchronous: the publisher doesn't wait for subscribers to process the message.
Pub/sub vs request/response
In request/response (HTTP, REST, or CoAPProtocolCoAPCoAP (RFC 7252) brings GET/POST/PUT/DELETE to devices with 8 KB of RAM over UDP. How Observe and DTLS work, and when to pick it over MQTT.View profile in its basic form), a client asks a specific server for something and waits for the answer. That fits commands and queries. Pub/sub fits streams of events flowing from many devices to many consumers. Many IoTITermIoT (Internet of Things)The IoT (Internet of Things) is the network of physical objects with sensors, software and connectivity that collect and exchange data and act autonomously.View profile systems use both: devices publish telemetry over MQTT, and applications query the stored data through an HTTP API. Our MQTT vs REST comparison covers the trade-offs.
Pub/sub in MQTT and in the cloud
In MQTT, the broker routes messages by topic. Subscriptions can use wildcards: + matches one level and # matches any number of levels, so factory/+/temperature covers every line. MQTT also attaches a delivery guarantee to each message (QoS 0, 1 or 2).
Google Cloud Pub/Sub applies the same pattern as a managed service: publishers send to topics, and subscribers receive through pull, push or export subscriptions. Delivery is at least once by default, with an exactly-once option.
Pub/sub in Cloud Studio IoT
Devices that connect to a Cloud Studio IoT instance over MQTT use the pattern in both directions: they publish readings to {MQTTUserID}/uplink/{DeviceAddress} and subscribe to {MQTTUserID}/downlink/{DeviceAddress} to receive commands, through the instance's own MQTT server with TLS on port 8883.
Frequently asked questions
What does pub/sub mean?+
Pub/sub is short for publish/subscribe: messages are published to topics and an intermediary delivers them to whoever has subscribed, without the sender and the receivers knowing each other.
Is MQTT a pub/sub protocol?+
Yes. The MQTT specification describes it as a client server publish/subscribe messaging transport: clients publish to topics on a broker, and the broker delivers the messages to subscribers.
What is the difference between pub/sub and a message queue?+
In pub/sub, every subscriber to a topic gets its own copy of each message. In a queue, each message goes to a single consumer, which spreads work across workers. MQTT 5.0 covers that second case with shared subscriptions.
Related terms
Related articles

Energy Monitoring System: How It Works and Submetering
What an energy monitoring system is, its parts (meters, submeters, CT clamps, Modbus, gateways), what submetering is, key metrics, and how to start one.
Sep 22, 2026

What Is Telemetry? How It Works, RTUs, and Examples
What telemetry is, how a telemetry system works from sensor to RTU to platform, where it's used, and how to set one up. Plus RTU vs PLC vs gateway.
Sep 22, 2026

FIWARE in 2026: Open IoT Standards Meet AI Copilots
What FIWARE is in 2026, how NGSI-LD works, how an AI Copilot consumes FIWARE context data, and when an open-standards stack beats a commercial IoT platform.
Sep 20, 2026

Industrial IoT Implementation: A Step-by-Step Plant Guide
An industrial IoT implementation in a running plant works when you respect the order: the problem first, then the signals, and the technology last.
Sep 17, 2026

IoT Platform Migration: How to Move Without Data Loss
Devices reconnect in a day. History does not. Every IoT platform migration is decided by the data you already own: five years of telemetry, the alert rules some
Sep 9, 2026

MQTT Broker: What It Is, How It Works, Best Options 2026
An MQTT broker is the central messaging server of an IoT network: it receives the data that devices publish and distributes it to every subscribed application.
Jul 8, 2026