MQTT in a Nutshell
What is it ?
A lightweight, resource-optimized networking protocol targeting device communication
uses TCP/IP for connectivity
Minimalistic
Why is it cool ?
One-to-many message distribution
Agnostic to payload content
Fixed length header is just 2 bytes
Ideal for IOT device-communication
Other Extras
Notify disconnections with "Last will and Testament" features
Keep-alive message
"Will" sent to clients on sudden unexpected disconnect
Last known good messages are retained by broker and given to new subscribers
Supports durable subscribers
Supports hierarchical topics
QoS Parameters
At most once - Reliability only ensured through TCP/IP
At least once - messages will arrive but can duplicate
Exactly once - messages should arrive only once and once. (Most reliable)
Security
SSL/TLS for security (over TCP)
Username/Password in connect message
Encrypted payloads
References
http://www.slideshare.net/paolopat/mqtt-iot-protocols-comparison
http://www.infoq.com/articles/practical-mqtt-with-paho
http://public.dhe.ibm.com/software/dw/webservices/ws-mqtt/MQTT_V3.1_Protocol_Specific.pdf
http://2lemetry.com/2013/08/22/mqtt-in-a-nutshell/
http://techexplosives-pamod.blogspot.com/2014/05/mqtt-transport-architecture-wso2-mb-3x.html











