What is MQTT?

Implementing MQTT in Ignition: Video 1

6 min video  /  4 minute read
Next Video >


Arlen Nipper discusses the invention of MQTT and how it became the simple and lightweight publish/subscribe messaging protocol we know today. Arlen covers MQTT specifications, messaging standards, and where MQTT is being used.

Video Transcript:

Arlen: MQTT has emerged as one of the dominant IoT transport protocols in use today. But what we're going to look at here is: What was the genesis of MQTT? Why was it invented and where is it used? Well, actually, MQTT was invented in 1999 on a project for Phillips 66, who wanted to use VSAT communications more effectively in their real-time, mission-critical SCADA system. Uniquely for SCADA systems at that time, they had multiple data consumers that wanted access to the real-time information that was out in the field.

Now realize on this VSAT system, the aggregate bandwidth was around 300 baud. So the design goals of MQTT were 1) It had to be simple. Our hardware platforms were 8-bit microprocessors with a maximum of 64 kilobytes of memory, so it had to be deployed on very small embedded systems in the field. 2) It had to be efficient. Again, with 300 baud of bandwidth and the more stations you could get on a single VSAT space segment, the more effectively you could use your VSAT infrastructure. Now, take in mind that this was being designed for real-time, mission-critical SCADA systems. So even though we were using TCP/IP, and we had that available, we still had to have stateful connections. In other words, if we were going to control things like pumps and valves in the field, we had to know what the current state of the connection of all those devices were out in the field.

And for 1999, what was very unique about MQTT is that we knew after 25 years of proprietary SCADA protocols that MQTT had to be open, it had to be adoptable by many different manufacturers if it was going to  be utilized and really provide us the leverage that we needed. Now, some important things to note about MQTT is that sometimes people look at it and they go, "Wait a minute, MQTT doesn't have packet reassembly, it doesn't have check sums and the messaging." Well, that's because it is literally built on top of TCP/IP. So, with MQTT, we let TCP do a lot of the hard work.

The other thing MQTT doesn't define in the MQTT specification is network security, and really will point back to the fact of number one is that we're relying on the latest TCP/IP security technologies to do all of the work for defining network security. And lastly, no payload definition, no formatting or encoding was specified, and this was on purpose because we knew looking at legacy protocols like Allen Bradley and Modbus that hard-coded function codes to data types were hard to expand going forward.

So what we ended up with is basically the definition of MQTT is a publish/subscribe, extremely simple, and lightweight messaging protocol designed for constrained devices in low-bandwidth, high-latency networks. But if you go from 1999 to 2019, you can see that efficiency and simplicity actually work in our favor for very high-speed, high-reliability networks.

Now technically an MQTT infrastructure, if you put it all together, it constitutes what's known as a Message-Oriented Middleware, or MOM, infrastructure. So even prior to the invention of MQTT, IT were using MOM-based infrastructures to help decouple IT applications from each other. Today, we look back and we look at these as service-oriented architectures or enterprise service buses. So really, what we're looking at is Message-Oriented Middleware for OT solutions. But MQTT uniquely was invented to solve this as applied to OT or SCADA-centric infrastructures.

Now, if we're going to look at MQTT going forward, we need to look and say, "Well, is this going to be around? Is it adopted? And who uses it?" This is a survey that's been done for the last six years by the Eclipse Software Foundation for IoT developers for both hardware and software solutions. I'm happy to say in 2018, that MQTT was actually more used even than HTTP in IoT solutions. And if we look at the adoption of MQTT, it's going up even faster. And then finally, if we look at where is an MQTT being used, so it's been around since 1999 and IBM had it in a lot of their products, but one of the first adoptions was by Facebook Messenger when they were looking for a more efficient, more reliable, more simple protocol to use for Facebook Messenger, and that blossomed into a lot of the cloud service providers providing native MQTT connectivity into their infrastructure as well. Tools like Node-RED, Historians like OSIsoft have MQTT connectors as well. But for the focus of this talk, we're going to  look at how Ignition and Ignition Edge can leverage MQTT technology.

Posted on December 13, 2019