What Is MQTT And Why You Need It In Your IoT Architecture

BehrTech Blog

What is MQTT and Why You Need It in Your IoT Architecture

[addtoany]

If you play in the IoT space, you may have heard of the MQ Telemetry Transport (MQTT) protocol. In addition to being used as an underlying communications protocol for IoT and Industrial IoT architectures, MQTT is used in smart home automation systems alongside cloud platforms such as Microsoft Azure, AWS and IBM Watson. Facebook also uses MQTT as a communication protocol for its Messenger and Instagram platforms.

The Industrial Internet of Things (IIoT) can be loosely defined as a system of sensors and other devices interacting with industrial and manufacturing systems all in an effort to enhance business operations. Industries like manufacturing, mining, oil & gas and agribusiness, to name just a few, deploy massive numbers of sensors. These sensors in turn send critical telemetry data to analytics engines, where the data is analyzed for trends and/or anomalies, enabling organizations to better understand and improve their operations.

In environments using Low Power Wide Area Network (LPWAN) solutions, sensor data is sent over wireless radio transmissions where it is received by one or more central base stations. This data, small as individual packets but massive when aggregated together, is then sent to analytics and visualization tools whether in the cloud or on-premises. That’s where MQTT comes in. Residing on top of the TCP/IP network stack, MQTT is a lightweight publish/subscribe messaging protocol designed for low-bandwidth, high latency, unreliable networks. MQTT’s features make it an excellent option for sending high volumes of sensor messages to analytics platforms and cloud solutions.

[bctt tweet=”As organizations migrate to LPWAN, MQTT will prove to be an excellent option for sending high volumes of sensor messages to analytics platforms and cloud solutions.”]

History of MQTT

MQTT was invented in 1999 by engineers Andy Stanford-Clark and Arlen Nipper, as a method of allowing pipelines in the oil and gas industry to communicate with Supervisory Control and Data Acquisition (SCADA) systems. At the time, these systems used disparate, proprietary protocols, and, as such, were not able to communicate with each other. Adding MQTT capabilities helped overcome inter-communication problems. In addition to interoperability, the original goals for the protocol were that it should be lightweight, bandwidth efficient, data agnostic and simple to implement while offering quality-of-service data delivery.

Publish/Subscribe Model

Unlike the traditional client-server model, in which a client communicates directly with an endpoint, MQTT clients are split into two groups: A sender (referred to as a publisher in MQTT) and a consumer that receives the data (an MQTT subscriber). The publisher and the subscriber do not know anything about each other, and, in fact, are never in direct contact with each other. A third component (an MQTT broker), acts like a ‘traffic cop’, directing messages from the publisher to any end points acting as subscribers.

MQTT in the IoT architecture

MQTT Topics

Messages make their way from a publisher, through a broker, to one or more subscribers using topics. Topics are hierarchical UTF-8 strings. Each level in a topic is delimited by a forward slash. Every message from a publisher must include a topic. To receive the published message, the entity that consumes the message must subscribe to the same topic. A broker sends the message it receives only to those clients that have subscribed to the same topic. Examples of topics are:

building1/shop-floor/temperature
location/field1/row10

MQTT and LPWAN

In environments using LPWAN solutions such as MIOTY by BehrTech, base stations perform the role of MQTT publisher. When a base station receives a message from a sensor, the base station publishes the message to the MQTT broker on behalf of the sensor. The broker then sends the message over TCP/IP to whatever device or devices that have subscribed to the topic.

MQTT in the IoT Architecture

MQTT is natively supported on BehrTech base stations. MQTT brokers and mappings for publishing data are configured with ease. Our out-of-the-box Azure integration also uses MQTT in its underpinnings. Another way in which we use MQTT is through the Node-RED programming tool. Performing the role of the subscriber, Node-RED takes incoming sensor data, processes it and sends it to visualization dashboards. As the published messages from the base station continue, Node-RED dashboards are updated on the fly.

Going forward, as organizations continue to move to LPWAN solutions in order to take advantage of its many benefits, the popularity of MQTT in the IoT architecture will grow as well.

[addtoany]

Subscribe to Our Monthly Blog Roundup



[vcv_posts_grid source=”%7B%22tag%22%3A%22postsGridDataSourcePost%22%2C%22value%22%3A%22post_type%3Dpost%26amp%3Bpost_status%3Dpublish%26amp%3Bposts_per_page%3D5%22%7D” unique_id=”3a363218″ pagination=”0″ pagination_color=”#ffce00″ pagination_per_page=”10″]PGRpdiBjbGFzcz0idmNlLXBvc3RzLWdyaWQtaXRlbSI%2BPGFydGljbGUgY2xhc3M9InZjZS1wb3N0cy1ncmlkLWl0ZW0taW5uZXJ7e2N1c3RvbV9mZWF0dXJlZF9pbWFnZV9oYXNpbWFnZV9jbGFzc19uZXdzX3Bvc3RfZ3JpZF9pdGVtfX0iPjxkaXYgY2xhc3M9InZjZS1wb3N0LWRlc2NyaXB0aW9uIHZjZS1wb3N0LWRlc2NyaXB0aW9uLS10aX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