MQTT
MQTT (short for Message Queue Telemetry Transport) is the preferred standard protocol for messaging-based communication in an IoT solution. It is an extremely lightweight protocol compared to other messaging protocols used in traditional enterprise applications, and therefore it is ideal for connecting remote devices with low-powered processors, simple programming, and low network bandwidth. MQTT, a lightweight communication protocol specifically designed to tolerate intermittent connections, minimize the code footprint on devices and reduce network bandwidth requirements.
MQTT has the following characteristics that make it useful for IoT solutions:
- Lightweight and Efficient MQTT client applications are tiny and require minimal resources so they can be used on small microcontrollers. MQTT message headers are small to optimize network bandwidth.
- Reliable Message Delivery Reliability of message delivery is important for many IoT use cases. That is why MQTT has 3 defined quality of service levels: 0 - at most once, 1- at least once, 2 - exactly once
- Support for Unreliable Networks Many IoT devices connect over unreliable cellular networks. MQTT’s support for persistent sessions reduces the time to reconnect the client with the broker.
- Security Enabled MQTT makes it easy to encrypt messages using TLS and authenticate clients using modern authentication protocols, such as OAuth.
Several message broker solutions implement this protocol. You can install them on your local machines, or in some cases, use them directly on the cloud without requiring any local installation.