MQTT? What is this?

Message Queuing Telemetry Transport

This is a simple messaging protocol designed for constrained devices with low bandwidth hence good for Internet of Things devices (IOT)
What’s a Protocol and low bandwidth? You may be asking yourself what is this?

Protocol refers to set of rules that allows electronic devices to communicate with each other they include the type of data to use and also how the data transfers occur. For Example an Apple iPhone can send an email to an Android device using a standard mail protocol. This is because they have a common protocol that enables them to communicate regardless of the manufacturer.

Low Bandwidth? Low bandwidth means slow network performance, and bandwidth issues are generally exhibited by attempts to process large amounts of data over an extended period of time. As we are all aware Most IOT devices receive and process data in real- time hence there’s a lot of data being processed

Now lets dig into understanding MQTT protocol!!

This is a protocol used to send commands to control outputs, read and publish data from sensors nodes used and much more. Hence it is more easy to establish communication between multiple devices working remotely.

How It Works?

Overview of MQTT

Since this is a Protocol, it has servers and clients. A MQTT server is called a MQTT broker where it receives all the messages and publishes the messages to the subscribed. When a client sends data to the broker it is called Publishing and when a client receives data from the broker it is called Subscribing. So here is it!! a client sends specific data to the MQTT broker; the broker receives all the messages, it filters the messages and send the specific messages to the subscribed. After publishing, a client on the other end subscribes to the messages so that he can receive them on a device.

Practical Example

Let’s Say we have a device that wants to send readings from a humidity sensor to the MQTT Broker and there’s a Mobile/Web Applications that wants to receive the humidity values.

So the device defines a topic called Humidity and then it publishes it as humidity to the MQTT broker. The Mobile/Web Application subscribes to the topic humidity so that it can receive the humidity readings. The MQTT broker is here to take the message and sends it to the Mobile/App Application.

Shadrack Myles

Author Shadrack Myles

More posts by Shadrack Myles

Join the discussion 11 Comments

Leave a Reply