Why MQTT is called as “light weight” messaging protocol?

旧时模样 提交于 2019-12-01 18:23:48

问题


As per Wikipedia and Mqtt.org,

MQTT is a machine-to-machine (M2M)/"Internet of Things" connectivity protocol. It was designed as an extremely lightweight publish/subscribe messaging transport.

In comparison with other TCP/IP or socket based protocols, what makes MQTT "extremely light-weighted"?


回答1:


The protocol overhead of MQTT is extremely small, the smallest packet has only 2 bytes overhead. The payload-to-overhead ratio is typically extremely good. It's also a binary protocol which reduces the overhead on the wire a lot.

An older but good blog post about the lightweightness can be found here: http://stephendnicholas.com/archives/1217

If you are interested in protocol details, check out this extensive blog post series: http://www.hivemq.com/mqtt-essentials-wrap-up/



来源:https://stackoverflow.com/questions/31502569/why-mqtt-is-called-as-light-weight-messaging-protocol

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!