LBLonely Binary Learn
ESP32TinkerBlockProductsFundamentalsTools
Shop
MQTT
The post office3
§All 3 in brief01Why a post office02Topics03Subscribing
Sorting and keeping2
§All 2 in brief04Wildcards05Retained messages
Delivery2
§All 2 in brief06QoS 0 and 107QoS 2, and each hop
Staying connected3
§All 3 in brief08Keepalive09Last will10Postcards and strangers
All fundamentals →
Fundamentals/MQTT/The post office
Chapter · MQTT

The post office

Why devices post to a broker instead of to each other, what goes on the envelope, and who gets a copy.

3 articlesabout 10 minutesNo board required
  1. 01Why a post office3 minA sensor that sends its reading straight to a phone has to know the phone's address, and breaks the day the phone moves. MQTT puts a post office in the middle, and every device needs only one address.
  2. 02Topics3 minAn MQTT message is addressed to a topic, a name for what it is about, never to a device. The broker sorts by that name alone, and a single wrong capital sends a reading where nobody is listening.
  3. 03Subscribing4 minA device tells the broker which topics it wants, and the broker copies every message on them to it. The sender never learns who is listening — and when nobody is, nothing tells it.

Start at 01 and read down — the order is the order things get easier in. Or take the one with your part in it; every article stands on its own, and links back to whatever it needs.

← Previous chapterThe two wires4 articlesNext chapter →Sorting and keeping2 articles
Lonely Binary Learn · Sydney, AustraliaHomeBlocksManualsESP32-S3 bookCompare chipsDownloadsProduct codesSearchCommunityRSSFluxgridShop