MQTT is a simple messaging protocol, using very low bandwidth. So, it's the perfect solution for Internet-of-Things applications. MQTT makes it easy to establish communications between millions of devices and is ideal for Smart City applications.
When a publisher in the Smart City - such as a Retail Sensing people counter - 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 how busy a bus is.
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.
MQTT is not the only method of communication used in the Internet-of-Things. Other protocols include SigFox and LoRaWAN.