Frontiers & the Future of Networking

MQTT

/ EM-cue-tee-tee /

Think about how a magazine subscription works. You do not phone the publisher each month asking 'is there a new issue?'; you subscribe once, and new issues are delivered to you automatically. Meanwhile the publisher does not need to know who its readers are — it just prints and ships, and a distribution center routes copies to whoever subscribed. MQTT brings this publish/subscribe pattern to networking, and it is one of the workhorse protocols of the Internet of Things — perfect for tiny, battery-powered devices that need to share data simply and cheaply.

Concretely, MQTT is a lightweight publish/subscribe messaging protocol. Instead of devices talking directly to each other, they all connect to a central server called a broker. A device publishes a message tagged with a topic — a label like sensors/greenhouse/temperature — and any device that has subscribed to that topic receives the message. Publishers and subscribers never need to know about each other; the broker matches topics and delivers. The protocol is deliberately tiny (its message headers can be just a couple of bytes), so it sips bandwidth and power, and it offers a few delivery-quality levels — from fire-and-forget, to at-least-once, to exactly-once — letting a device trade reliability against overhead. It typically runs over TCP, often secured with TLS.

Why it matters: MQTT's decoupling and tiny footprint fit constrained IoT devices and unreliable networks beautifully — a sensor can publish a reading and go back to sleep without holding a conversation, and the broker buffers and fans out messages to whoever cares. The honest caveats: the broker is a central point that everything depends on (a single point of failure and a bottleneck if it goes down or is overwhelmed), and MQTT by itself provides no encryption — that confidentiality comes from running it over TLS, which you must actually enable. It is also not the only choice; CoAP and others fill similar niches with different trade-offs.

A door sensor publishes 'open' to the topic home/frontdoor whenever the door moves. A phone app and a security camera have both subscribed to that topic. When the door opens, the broker instantly delivers the message to both — yet the sensor itself has no idea who, if anyone, is listening.

Publishers and subscribers are decoupled through the broker.

MQTT itself does not encrypt anything — its tiny messages are plaintext unless you run it over TLS, which you must explicitly enable. And the broker everything connects through is a single point of failure: if it goes down, publishers and subscribers can no longer reach each other.

Also called
Message Queuing Telemetry TransportMQTT 協定