MQTT is a lightweight messaging protocol over TCP/IP that supports the publish-subscribe paradigm. It is most suited for low bandwidth / high latency and unreliable networks and hence is a natural fit for field IoT devices. A good MQTT primer is available
here.
MQTT was the de-facto protocol for all our IoT applications, but of late we have started experimenting with MQTT even for mobile apps, after we learned that
Facebook Messenger app uses MQTT :)
MQTT sessions can survive across TCP connection re-connects and thus is very useful in unreliable network conditions. Also in MQTT, you can specify the QoS level - e.g.
- Fire and forget (QoS 0)
- At least once (QoS 1)
- Exactly once (QoS 2)
It is very important to check if the MQTT broker we choose supports the required QoS levels.
MQTT supports a hierarchy of topics, so you can subscribe to a top level topic and get all the messages to the subscriber.