What is MQTT, and Why Does it Matter?

MQTT

February 26, 2018

In the world of Internet of Things (IoT) the main currency is messages. Even as you read this hundreds of thousands of devices are sending status reports, receiving orders (like “turn up the heat”, “measure the room humidity” etc.), storing data from other devices or doing numerous other tasks that make our lives easier. And they all need to exchange information, as without connectivity, their usefulness is immensely reduced.

But with the rapidly increasing number of devices that require Internet to communicate and be useful to individuals, businesses or governments, concerns like preserving bandwidth, ensuring that low-connectivity machines can also transmit data and even preserving battery life of gadgets need to be addressed. That is where MQTT comes in.

 So, What is MQTT?

MQTT stands for Message Queuing Telemetry Transport or MQ Telemetry Transport. It is an open source machine-to-machine (M2M) messaging protocol that increasingly becoming the industry standard for IoT device communication. MQTT is a lightweight protocol, based on a publish/subscribe methodology that can be supported by even small devices in remote, low-connectivity destinations. Designed to breach the gap between the physical world gadgets (phones, sensors, wearables and etc.) with software processing technologies, this code is one of the main reasons for the expected 204.41% increase of IoT connected devices by 2025.

How Does MQTT Work?

Initially, MQTT was developed as a proprietary software in 1999 by Andy Stanford-Clark (IBM) and Arlen Nipper (Arcom, now Cirrus Link). It was designed to carry information from remote oil pipelines through satellite connection and deliver it to the industrial data centers for analysis and storing. As you can imagine preserving both bandwidth and battery power were the two main concerns. Today, these two are still at the core of MQTT. However, it has become the main standard not only for Industrial Internet of Things (IIoT) but also for the smart gear we use in our everyday life.

So, to understand how MQTT works, you need to simply think about your favorite radio or TV channel. We have devices that publish to a broker on a specific topic. Then the broker sorts the data it receives from all publishers and organizes it into subjects. Clients subscribe to different channels and receive only the information about the specific topic they are programmed to listen for.

 
In this line of thought MQTT is really like a radio station – listeners tune in only for the broadcasts they like and the radio has different shows to cater to the needs of a wider audience. Unlike radio, however, this machine-to-machine protocol allows subscribers not only to “listen” but also to publish (broadcast) information. We have a two-way communication channel.

 

What Are the Main Benefits of MQTT for IoT?

Centralized System

As we mentioned the number of IoT devices increases rapidly. Just over a two-year period (from 2015 to 2018), it skyrocketed with over 50% increase. So, the need to manage the strain on bandwidth is tangible. Thanks to the broker device, the amount of data transmitted over the Internet can be limited. Thus, the subscriber is also relieved of the need for huge processors to handle the data.

Clear Message Hierarchy

With this much information flowing seamlessly between broker and devices, hierarchy is a must. That’s where MQTT shines with three different Quality of Service (QoS) levels. These define both the importance and the repetitiveness of a message within their environment. For example, QoS level 0 means that this is a one-time message, most likely a confirmation. It’s priority doesn’t warrant storage or a reply.

Information Flow Preservation

There are two ways for a MQTT session to be terminated. The first one is called a graceful shutdown. It happens when the publisher send a message to the clients, through the broker that it will disconnect. After a graceful shutdown, the client can later reconnect (subscribe to the same channel) easily by just providing its authentication tokens.

Should data transmission end unexpectedly, the broker has a pre-recorded (previously cached) message for all subscribers. Appropriately called “last will and testament”, it provides instructions for the clients on how to proceed if the publisher disconnects abruptly.

 

What Are the Main Challenges of Using MQTT?

Since MQTT was designed for a secure network where the data load was specific to a task at hand, its topic structure (the number of channels that a client can subscribe for) can grow exponentially. However, while the topic tree grows, there is not a clearly defined method to divide it into smaller, easily manageable chunks of logical data. The more information we put into the topic tree, the more it expands and becomes more and more complex. Thus, creating a scalable global MQTT network is still a difficult task.

Another issue that stems from the protocol’s original purpose is security. To provide a 21st-century level of security, MQTT needs to be used along with a mandatory SSL/TLS protocol that provides appropriate data encryption. However, SSL is by all means not a lightweight protocol. Moreover, all security features that are placed on top of MQTT not only inflate the code footprint but also put strain on bandwidth – the one thing MQTT is designed to relieve.

 

Why Is MQTT Important?

Despite of the issues that still leave some questions unanswered, it cannot be denied that the protocol is improving for the better. As developers all over the world work on solving security and data management issues, MQTT is already becoming the standard for Internet of Things communications. It provides many powerful benefits that cannot go unnoticed:

  • Distributes information more efficiently
  • Relieves strain and maximizes available bandwidth
  • Improves scalability
  • Reduces development time

From controlling your home environment remotely to using a messaging system like Facebook Messenger, MQTT is already part of your everyday life. And it will only become more common as technology evolves.

Source: http://kymerasystems.com/2018/02/07/what-is-mqtt-and-why-does-it-matter/

Related Articles


Changing Scene

  • SEW-Eurodrive: MAXOLUTION System Solutions

    SEW-Eurodrive: MAXOLUTION System Solutions

    Whether in production or logistics operations, MAXOLUTION is synonymous with innovation in factory automation – across all industries and worldwide – helping you achieve your vision of an adaptable and resilient lean smart factory. Under the MAXOLUTION brand, SEW-EURODRIVE creates customized solutions for cutting-edge materials handling technology – from the shop floor through to IT.… Read More…

  • 6 Ways the New maxon Website Enhances Your Experience

    6 Ways the New maxon Website Enhances Your Experience

    maxon develops drives that are among the best in the world. They advance technologies that save lives on Earth, make driving and flying safer, and enable the use of robots in space. Where uncompromising precision and the highest quality standards are crucial for success, their drive systems show what they are made of. Complexity is… Read More…


Sponsored Content
The Easy Way to the Industrial IoT

The way to the Industrial IoT does not have to be complicated. Whether access to valuable data is required or new, data-driven services are to be generated, Weidmuller enables its customers to go from data to value the easy way. Weidmuller’s comprehensive and cutting-edge IIoT portfolio applies to greenfield and brownfield applications. Weidmuller offers components and solutions from data acquisition, data pre-processing, data communication and data analysis.

Visit Weidmuller’s Industrial IoT Portfolio.


ADVANCED Motion Controls Takes Servo Drives to New Heights (and Depths) with FlexPro Extended Environment Product Line

Advanced Motion Controls is proud to announce the addition of six new CANopen servo drives with Extended Environment capabilities to their FlexPro line. These new drives join AMC’s existing EtherCAT Extended Environment FlexPro drives, making the FlexPro line the go-to solution for motion control applications in harsh environments.

Many motion control applications take place in conditions that are less than ideal, such as extreme temperatures, high and low pressures, shocks and vibrations, and contamination. Electronics, including servo drives, can malfunction or sustain permanent damage in these conditions.

Read More


Service Wire Co. Announces New Titles for Key Executives

Bruce Kesler and Mark Gatewood have been given new titles and responsibilities for Service Wire Co.

Bruce Kesler has assumed the role of Senior Director – Business Development. Bruce will be responsible for Service Wire’s largest strategic accounts and our growing Strategic Accounts Team.

Mark Gatewood has been promoted to the role of Vice President – Sales & Marketing. In this role, Gatewood will lead the efforts of Service Wire Company’s entire sales and marketing organization in all market verticals.

Read More


Tri-Mach Announces the Purchase of an Additional 45,000 sq ft. Facility

Tri-Mach Elmira Facility

Recently, Tri-Mach Inc. was thrilled to announce the addition of a new 45,000 sq ft. facility. Located at 285 Union St., Elmira, ON, this facility expands Tri-Mach’s capabilities, allowing them to better serve the growing needs of their customers.

Positioning for growth, this additional facility will allow Tri-Mach to continue taking on large-scale projects, enhance product performance testing, and provide equipment storage for their customers. The building will also be the new home to their Skilled Trades Centre of Excellence.

Read More


JMP Parent Company, CONVERGIX Acquires AGR Automation, Expanding Global Reach

Convergix Automation Solutions has completed the acquisition of AGR Automation (“AGR”), a UK-based provider of custom, high-performance automation design and systems integration primarily to the life sciences industry.

Following Convergix’s acquisitions of JMP Solutions in August 2021 and Classic Design in February 2022, AGR marks the third investment in Crestview’s strategy to build Convergix into a diversified automation solutions provider targeting the global $500+ billion market, with a particular focus on the $70 billion global systems integration and connectivity segments. Financial terms of the transaction were not disclosed.

Read More


Latest Articles

  • Making the Sustainable Transformation of the Process Industry a Success

    Making the Sustainable Transformation of the Process Industry a Success

    By Krystie Johnston and Dr. Manfred Jagiella – Sustainability facilitates opportunity when approached with a mindset to preserve resources and promote circularity. We share one Earth, and it is our global responsibility to care for it for the next generation. Endress+Hauser is one global company that understands this responsibility – and practices it as well.… Read More…

  • Why NOARK’s 12VDC Shunt Trip Coils for MCCBs Make Power Systems Reliable and Safer

    Why NOARK’s 12VDC Shunt Trip Coils for MCCBs Make Power Systems Reliable and Safer

    Circuit breakers are an essential component of any modern electrical system. Designed to protect your home or business from potential overloads or short circuits, these devices are your first line of defense against electrical fires. There are, however, situations where remote tripping of the circuit breaker may be required. It could be for operational reasons,… Read More…