Definition, functions and chances of MQTT

What is MQTT?

Message Queuing Telemetry Transport, or MQTT for short, is a communication protocol originally developed by IBM for M2M communication in the Internet of Things (IoT).
In particular, it was developed to enable data transmission in places with limited infrastructure networks and low-power devices with limited performance. A few years ago, MQTT was officially defined as an OASIS standard, and as of 2019, it is in the latest MQTT 5 specification .

How does MQTT work?

The MQTT message protocol makes use of the concept of server-client communication. Here, the communication between server and client is ensured by a publish-subscribe pattern. Necessary for the model of publish / subscribe is a broker, which is offered by different companies and is the center of the communication. Welotec’s Edge Gateway series is particularly suitable for implementing such an MQTT broker. Clients can connect to the message broker and exchange data with each other in this way.

Publish/Subscribe

All communication takes place via the central distributor, the MQTT message broker. Each message that a client sends contains the actual payload data in addition to the so-called “topic”.

Publish / Subsribe with the Welotec Edge Gateway as a MQTT-Broker

 

Each client therefore knows the broker in the middle of the communication. However, the clients are completely separated from each other by different paths.
The topics are simple text messages like “temperature” and enable the addressing of the communication. If, for example, a temperature sensor wants to publish data that has been recorded for other clients, it must send the Topic along with the actual message, the so-called payload. All others can subscribe to these topics and receive a message when something has been published on the corresponding topic.

Advantages and disadvantages of the communication protocol

Disadvantages of MQTT

MQTT is commonly found in industrial IoT infrastructures, but the communication protocol is not standard on known controllers. This means that the necessary data must first be read out via other standards or protocols in order to subsequently process them with MQTT. For this purpose, devices with a protocol conversion such as the Welotec Industrial Router TK602L or the Welotec Edge Computing Gateways, which receive the data and publish it as a client to an MQTT broker, can be used.

Furthermore, the message content, i.e. the payload, is not specified, which is why the sender and receiver must be made aware of the corresponding message structure in advance. If this is not taken care of, the participants exchange the data but do not understand the message content. Known message structures that are often used are, for example, Json or XML.

Advantages of MQTT

One advantage of the communication protocol is the publish/subscribe architecture and the communication via the MQTT broker. The decisive factor here is that the devices and applications are completely decoupled, since each client only knows the message broker, but not the other participants. In addition, the decoupling of the participants brings great added value in the separation between IT and OT, especially when it comes to security-relevant infrastructures.

With MQTT, 1:N communication can be mapped, so it is possible for a single message to be published to a topic by one subscriber, but for multiple subscribers to have the message delivered by the broker.

Furthermore, another popular feature of the communication protocol in the context of IoT use cases lies in thein the protocol features of MQTT. These features serve typical problems in constrained infrastructures where bandwidth is compromised or connectivity is unstable.These include, but are not limited to:

  • Quality of Service Levels
  • Persistent Session and Queuing Messages
  • Retained Messages
  • Last Will and Testament
  • Keep Alive & Client Take-Over

Opportunities through MQTT in the context of Industry 4.0

MQTT is particularly suitable for reliable message transmission in unreliable and unstable networks, such as mobile networks.

This makes MQTT an optimal protocol for the Internet of Things and mobile communication. The protocol impresses with its simplicity and ease of implementation in IoT infrastructures.

In the meantime, the protocol has established itself especially as a standard for communication to cloud systems and is thus also used in industry. Especially the possibility to distribute a published message to different services at the same time is a useful tool. As of today, MQTT is one of the leading and most convincing protocols in the IoT due to its special protocol features. In the future, too, the communication protocol will play a major role in the implementation of Industry 4.0, especially with regard to cloud systems such as Microsoft Azure.