MQTT: Communication for the Internet-of-Things
MQTT is a simple messaging protocol, using very low bandwidth. It's the perfect solution for Internet-of-Things applications. MQTT makes it easy to establish communications between millions of devices and so is ideal for Smart City applications.
When a publisher in the Smart City - such as a pollution sensor - has new information to distribute, it sends a message with the data to the connected "broker" or server. The broker then distributes the information to any "clients" that have subscribed to that topic, such as an app showing today's levles of nitrogen dioxide and other pollutants.
Some terms used in MQTT
- MQTT Messages
- Information that devices exchange. Either commands or data.
- MQTT Topics
- A label attached to a message. Lets a device register interest for that type of message, or sets where it wants to send its message.
- MQTT Broker or Server
- Receives messages and publishes them to all clients subscribed to that topic. The terms server and broker are interchangeable for MQTT.
- MQTT Client
- Subscribes to a topic and receives information from the broker, for example an app running on a mobile phone showing people counts. A client may also publish messages to the broker, so a people counter could be a client.
- When a publisher, like a people counter or temperature sensor, sends information to the broker.
- When a client, like a reporting system, wants to get a specific type of information from the broker.