MQTT: Message Queuing Telemetry Transport

with 2 Comments

MQTT was developed by Andy Stanford-Clark (IBM) and Arlen Nipper (Eurotech; now Cirrus Link) in 1999 for the monitoring of an oil pipeline through the desert. The goals were to have a protocol, which is bandwidth-efficient and uses little battery power, because the devices were connected via satellite link and this was extremely expensive at that time.

iot,mqtt,mosquito

MQTT (Message Queuing Telemetry Transport) is a lightweight messaging protocol that provides resource-constrained network clients with a simple way to distribute telemetry information. The protocol, which uses a publish/subscribe communication pattern, is used for machine-to-machine (M2M) communication and plays an important role in the Internet of Things (IoT).

The protocol uses a publish/subscribe architecture in contrast to HTTP with its request/response paradigm. Publish/Subscribe is event-driven and enables messages to be pushed to clients. The central communication point is the MQTT broker, it is in charge of dispatching all messages between the senders and the rightful receivers. Each client that publishes a message to the broker, includes a topic into the message. The topic is the routing information for the broker. Each client that wants to receive messages subscribes to a certain topic and the broker delivers all messages with the matching topic to the client. Therefore the clients don’t have to know each other, they only communicate over the topic. This architecture enables highly scalable solutions without dependencies between the data producers and the data consumers.
mqtt broker,services,iot

Facebook currently uses MQTT for their messenger app, not only because the protocol conserves battery power during mobile phone-to-phone messaging, but also because in spite of inconsistent Internet connections across the globe, the protocol allows messages to be delivered efficiently in milliseconds. Amazon Web Services (AWS) supports MQTT, as well as HTTP, for connecting remote devices to the Amazon IoT cloud.

MQTT – Messages

Messages are the information that you want to exchange between your devices. Whether it’s a command or data.

With the publish and subscribe system you can do pretty much anything you want in your home automation projects.

MQTT – Topics

Another important concept is topics. Topics are the way you register interest for incoming messages or how you specify where you want to publish your message.

Topics are represented with strings separated by slashes. The slashes indicate the topic level.

Summary

This simple application is just an example and can be easily adapted and reused for more advanced purposes. You could simply extend the existing code so that multiple clients in different rooms measure the temperature and brightness, and the Control Center also indicates that. Another possibility would be to replace the Control Center through a web dashboard where the values are displayed in several charts using the Paho JavaScript library.

As we have seen, it is possible with very little effort to create application that communicates over MQTT. The Eclipse Paho library implements all the functionality that is described in the MQTT specification and MQTT should be a tool in the repertoire of every developer, who deals with the Internet of Things or the requirement of connecting mobile devices.

for more on IOT pls bookmark us

innovatingfuture

2 Responses

  1. raj soni bhopal
    |

    what is this, can you explain?

    • rishabh kumar
      |

      go through the article u get some idea