Skip to content
Protocols

Publish-subscribe

A messaging pattern in which senders publish messages to named channels and receivers subscribe to those channels, so neither side needs to know the other.

In publish-subscribe, often shortened to pub/sub, a producer labels each message with a topic and hands it to an intermediary, usually a broker. Any number of consumers subscribe to topics, and the broker copies each message to all of them. The sensor publishing a temperature does not know whether one dashboard or ten analytics jobs are listening, and consumers can be added without touching device firmware.

That decoupling is why the pattern underpins MQTT, AMQP, DDS and most event-driven architectures in IoT: devices are many, transient and resource constrained, while backends change often. The trade-offs are the broker as a dependency and the lack of a built-in reply path, so request-response interactions such as setting a value and confirming it need conventions such as response topics or correlation IDs, which MQTT 5 added explicitly. See MQTT explained.

Part of the IoT Glossary. Spotted an error or a missing term? Tell us.