EP Basics: IoT ProtocolsWhat is MQTT and what is it used for?
Von
Sebastian Human
4 min Reading Time
MQTT is an open network protocol for transmitting messages. These messages transmit important information in the Internet of Things. It is primarily used when connections allow only a small amount of administrative data.
MQTT is designed for IoT devices and thus lightweight, which enables cost-effective device communication.
The abbreviation MQTT stands for Message Queuing Telemetry Transport. It is a lightweight communication protocol that was specifically developed for wireless sensor networks. For this reason, it is often used in automation technology, industrial communication, and not least in the Internet of Things (IoT). Originally decoupled devices can thus communicate directly with each other. It is an open protocol that has been standardized by OASIS and ISO (ISO/IEC 20922:2016).
It follows the principle of a Publish Subscribe model and operates on TCP/IP. In this function, it allows a device to send information to a broker and then forward it to other devices that are interested in this information.
It is a simple but powerful protocol. In its core function, it facilitates communication between different devices. Thus, it plays an important role in machine-to-machine communication or the Internet of Things.
What does the MQTT architecture look like?
The MQTT architecture consists of a server, also called a broker, one or more clients, and a network. The broker is the central intermediary that enables communication between the clients. It is responsible for receiving, storing, and sending messages to the clients.
The clients are the end devices that communicate with the broker. They can send messages to the broker and receive messages from the broker. These messages are also known as MQTT Message.
The network represents the connection between the broker and the clients. It can be either a local network or the internet. The so-called Quality of Service can be divided into three levels. This allows one to find the best individual compromise between the smallest possible data transmission and the greatest possible reliability for their own applications.
The Quality of Service starts at level 0. This level entails only a minimal data transfer. To keep the data volume as low as possible, this level relies on a maximum of one-time delivery. Confirmation of successful delivery is not provided at this level.
At level 1, the broker attempts to successfully transmit the message and then waits for confirmation from the subscriber. If this is not received within a defined period, the broker sends the information again. This is therefore referred to as at least once delivery.
At level 2, both the broker and the client use a four-step handshake. Through this, both instances guarantee that the message is sent or received exactly once. This is therefore referred to as exactly once delivery.
What does an MQTT broker do?
An MQTT broker is a server that acts as an intermediary between MQTT clients. It can therefore also be referred to as an MQTT server. It receives messages from the clients and forwards them to the clients that are interested in those messages. The broker is responsible for managing the messages and the connection between the clients.
What role does an MQTT client play?
An MQTT client is a program that uses the protocol to transmit messages between a server and one or more clients. It can be used to transfer data between different devices. For example, it transmits information between a smartphone and a computer or between a sensor and a server.
What tasks does MQTT perform?
This protocol is suitable for use in wireless sensor networks, for example, because it requires low bandwidth and low energy consumption. MQTT is also used to counteract unreliable networks. It is considered very reliable and ensures secure information transmission. It can also be used as a communication protocol between different devices and systems. In this function, it transmits data between these instances.
Who uses MQTT?
MQTT is mainly used by companies and organizations that require fast, reliable, and scalable communication between devices. Therefore, it is often used in the Internet of Things to transfer data between devices. Naturally, it is also used in the automation industry, healthcare, transportation, retail, and other sectors.
How can you install an MQTT broker on a Raspberry Pi?
To install an MQTT broker on a Raspberry Pi, you first need to install the operating system on the single-board computer. Then, you must open a terminal and enter the following commands:
Date: 08.12.2025
Naturally, we always handle your personal data responsibly. Any personal data we receive from you is processed in accordance with applicable data protection legislation. For detailed information please see our privacy policy.
Consent to the use of data for promotional purposes
I hereby consent to Vogel Communications Group GmbH & Co. KG, Max-Planck-Str. 7-9, 97082 Würzburg including any affiliated companies according to §§ 15 et seq. AktG (hereafter: Vogel Communications Group) using my e-mail address to send editorial newsletters. A list of all affiliated companies can be found here
Newsletter content may include all products and services of any companies mentioned above, including for example specialist journals and books, events and fairs as well as event-related products and services, print and digital media offers and services such as additional (editorial) newsletters, raffles, lead campaigns, market research both online and offline, specialist webportals and e-learning offers. In case my personal telephone number has also been collected, it may be used for offers of aforementioned products, for services of the companies mentioned above, and market research purposes.
Additionally, my consent also includes the processing of my email address and telephone number for data matching for marketing purposes with select advertising partners such as LinkedIn, Google, and Meta. For this, Vogel Communications Group may transmit said data in hashed form to the advertising partners who then use said data to determine whether I am also a member of the mentioned advertising partner portals. Vogel Communications Group uses this feature for the purposes of re-targeting (up-selling, cross-selling, and customer loyalty), generating so-called look-alike audiences for acquisition of new customers, and as basis for exclusion for on-going advertising campaigns. Further information can be found in section “data matching for marketing purposes”.
In case I access protected data on Internet portals of Vogel Communications Group including any affiliated companies according to §§ 15 et seq. AktG, I need to provide further data in order to register for the access to such content. In return for this free access to editorial content, my data may be used in accordance with this consent for the purposes stated here. This does not apply to data matching for marketing purposes.
Right of revocation
I understand that I can revoke my consent at will. My revocation does not change the lawfulness of data processing that was conducted based on my consent leading up to my revocation. One option to declare my revocation is to use the contact form found at https://contact.vogel.de. In case I no longer wish to receive certain newsletters, I have subscribed to, I can also click on the unsubscribe link included at the end of a newsletter. Further information regarding my right of revocation and the implementation of it as well as the consequences of my revocation can be found in the data protection declaration, section editorial newsletter.
sudo apt-get update
sudo apt-get install mosquitto
sudo apt-get install mosquitto-clients
Afterward, the MQTT broker should start with the command "mosquitto -v". It is also possible to edit the configuration file to customize the broker according to individual requirements.
How secure is MQTT?
MQTT is considered a very secure protocol. It uses TLS encryption to encrypt all messages transmitted between client and broker. It also uses authentication and authorization to ensure that only authorized clients can access the broker. Additionally, users can also implement their own security measures such as firewalls or VPNs to further protect the communication.
What is MQTT Standard 5.0?
The MQTT standard 5.0 is the latest version of the Message Queuing Telemetry Transport protocol. It was developed to enable secure and reliable communication between devices. It offers a number of improvements over previous versions, including enhanced security features, advanced message control, and support for more message formats. These new features enable developers to create secure and reliable applications based on the MQTT protocol.