MQTT is one of the most popular M2M protocols and stand for Message Queuing Telemetry Transport. It is so sought after because its simplicity, the fact that it’s lightweight and publish/subscribe. It’s low-bandwidth, high latency and was developed for unreliable networks. So, if you are working in a resource-constrained network, it provides a simple way to distribute telemetry information. It’s been around since 1999 when it was developed by Dr Andy Stanford-Clark of IBM and Arlen Nipper. And, you’ll find it in applications like Facebook Messenger and Amazon Web Services amongst others.
MQTT aims to deliver reliability and a degree of assurance of delivery when network bandwidth and resource requirements like we described above are scarce. It makes it plain to see, why M2M first and now the IoT have adopted this messaging protocol as one of the most popular options. Have a look at some of its benefits:
Mongoose makes MQTT easy for both; an embedded MQTT server and MQTT client.
All you need to do is call mg_set_protocol_mqtt - and your connection is MQTT connection. You can publish and subscribe with these simple functions: mg_mqtt_publish, mg_mqtt_subscribe.
If you require an embedded MQTT server you can simply call mg_mqtt_broker_init.
Mongoose Embedded Web Server ships with examples for both client and broker - take a look, you will see that we’ve maintained the simplicity intended by this protocol.