MQ Telemetry Transport Protocol for IoT
Join the DZone community and get the full member experience.Join For Free
MQTT protocol is a lightweight, open and simple network protocol for the device communications. It is based on the principle of publishing messages and subscribing to topics, or "pub/sub". The protocol runs over TCP/IP, or over other network protocols that provide ordered, lossless, bi-directional connections. It was designed for the low-bandwidth, high latency networks in the late 1990s/early 2000s and its support to connect over thousands of clients to a single server. This characteristic is a suite for the devices which has very limited processing powers and limited memory, such as sensors, mobile devices, monitoring devices. Since It provides a common interface for everything, new sensors or devices can integrate very easily with the system.
Two wildcards are available,
+can be used as a wildcard for a single level of hierarchy.
#can be used as a wildcard for all remaining levels of hierarchy.
- QoS 0 - At most once delivery: With this setting, messages are delivered according to the best effort of the underlying network.
- QoS 1 - At least Once Delivery: For this level of service, the MQTT client or the server would attempt to deliver the message at-least once.But there can be a duplicate message.
- QoS 2 - Exactly once delivery: This is the highest level of Quality of Service. Additional protocol flows ensure that duplicate messages are not delivered to the receiving application.
Opinions expressed by DZone contributors are their own.