Iris Classon
Iris Classon - In Love with Code

(Not so) Stupid Question 327: What is MQTT?

what is mqtt

Another question, and another beautiful hike in Norway! This time the question is about ptotocols, in particular MQTT. MQTT stands for Message Queuing Telemetry Transport and it has been around for a while, but with IoT growing in popularity both on consumer and developer side it has become more relevant and gained more traction. Watchthe video, or keep reading :)

So, what is it?

It’s a binary messaging protocol, based on the publish subscribe model. You have a publishing server, a broker and a client or clients.

Why MQTT? Well, besides widespread adoption, it is lightweight and message agnostic, an ISO standard and works on top of TCP/IP protocol.

If you are familiar with RabbitMQ, a hybrid message queuing broker, then you know about message queuing. RabbitMQ is as mentioned above, hybrid, and supports a variety of message protocols such as WebSockets and AMQP, and also MQTT. Which protocol you use depends on why you want to achieve, your requirements, and more importantly, your expected limitations. With IoT devices you often have limited bandwidth and CPU power, and therefore a lightweight protocol such as MQTT (for comparison, the header is only 2 bytes vs 8 bytes for AMQP). There are several significant differences between the different protocols, for example AMQP has more features and can send large messages, but I’ll save that comparison for another time. If you’d like an in-depth comparison of AMQP and MQTTI can recommend the following paper.

Comments

Leave a comment below, or by email.


Last modified on 2019-08-08

comments powered by Disqus