As many companies in industries such as manufacturing, oil & gas, energy & utilities, and transportation & logistics implement “smart” network-aware devices, the desire to remotely monitor and manage these devices has grown. There is immense business value in the enhanced control, awareness, and automation these Internet of Things (IoT) solutions offer.
However, navigating the continuous communications of these devices across unreliable networks in a way that performs and scales efficiently presents a big challenge. Over the last few years, Message Queuing Telemetry Transport (MQTT) has emerged as the leading standard for IoT communications. Created at IBM over twenty years ago, it was officially submitted to OASIS as a standard around 2013. Since then, it has risen to be the leading messaging protocol for IoT solutions due to several benefits:
Given these benefits, let’s look at how MQTT works and where it fits into a typical IoT solution.
In Figure 1, you can see a high-level view of a typical industrial IoT solution.
Figure 1 – Typical Industrial IoT Architecture
Starting from the left, you can see the edge location where one or more devices are in operation. In our diagram we have a separate Programmable Logic controller (PLC) for controlling the devices and acting as the point of contact for the central IoT solution. Many devices are emerging with these PLC capabilities built in, eliminating the need for a separate controller. But for our discussion, let’s consider them separate. This PLC communicates where data is processed to the central IoT solution; this communication is where MQTT fits in.
(There are more advanced IoT architectures where data processing happens on the edge, but for this discussion we’ll keep things as simple as possible.)
Once data is transmitted to the cloud platform, the streams can be processed, aggregated, and stored for use by user applications, as well as analyzed by A.I. and Machine Learning platforms to drive automation. (We’ll cover those components in a separate article.)
Now let’s look at specific aspects of MQTT and see how they fit within our example architecture.
MQTT Broker
The broker acts similar to a standard messaging broker you’d find in other publish/subscribe models. It is responsible for managing client connectivity, security (authentication and authorization), topics, and message receipt/delivery for thousands (or even millions) of client connections.
In our architecture, the MQTT broker plays the part of the Cloud Gateway. It takes the data from the edge locations and streams it into the data processing component.
MQTT Client
The client is the individual endpoint in the architecture. In our example, it’s the edge PLC device. This device connects to the MQTT broker (“Gateway”) using whatever security is required. Often this connection is secured via specific credentials and runs over TLS for network data encryption. The broker then controls the permissions for each connected client–limiting which topics it can subscribe and/or publish to.
Last Will & Testament (LWT)
This is a message the client provides the broker upon connection. It provides information to subscribers in the event the client becomes unexpectedly disconnected from the broker.
Quality of Service (QoS)
MQTT supports multiple QoS options within the standard:
There are many options when choosing platforms that support the MQTT standard. On the edge, many smart devices and PLCs are capable of communicating via MQTT. However, the standard has evolved and not every device or PLC will have full support of all MQTT capabilities. (For example, some PLCs might not support QoS 2.) Also, there are multiple versions of MQTT in use so it’s important to look closely at any vendor’s specific MQTT support. The most current version is v5, however, typically any support level over v3.11 will be compatible.
On the cloud side, all leading IoT platforms (e.g., Azure IoT Hub, AWS IoT Core) support MQTT. However, although they support the MQTT protocol, they are not full-featured MQTT brokers. Often, they lack the specific requirements around QoS and LWT capabilities. In many cases this does not prevent the use of these platforms in an IoT solution using MQTT. If you feel your solution needs those broker capabilities, alternative platforms are available—both open source (e.g., Mosquitto) and vendor licensed (e.g., Hive MQ). Additionally, many messaging platforms, such as Confluent Kafka and Rabbit MQ, have MQTT extensions that may be added to facilitate use of the standard.
If you’re considering designing an IoT solution but are unsure which platforms and standards (such as MQTT) best fit your needs, Anexinet is here to help. Please feel free to reach out to us at any time. We’ve architected and implemented countless IoT solutions for clients and can help you design the ideal solution for you and your company.
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
Cookie | Duration | Description |
---|---|---|
cookielawinfo-checbox-analytics | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics". |
cookielawinfo-checbox-functional | 11 months | The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional". |
cookielawinfo-checbox-others | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other. |
cookielawinfo-checkbox-necessary | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary". |
cookielawinfo-checkbox-performance | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance". |
viewed_cookie_policy | 11 months | The cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data. |
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.
Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.