MQTT
MQTT is a lightweight, publish–subscribe, machine-to-machine network protocol for message queueing/message queuing services.[src] It is designed for connections with remote locations that have devices with resource constraints or limited network bandwidth, such as in the Internet of things (IoT).[src] It must run over a transport protocol that provides ordered, lossless, bi-directional connections—typically, TCP/IP.[src] It is an open OASIS standard and an ISO recommendation (ISO/IEC 20922).[src]
MQTT is a lightweight, publish–subscribe, machine-to-machine network protocol for message queueing/message queuing services.[src] It is designed for connections with remote locations that have devices with resource constraints or limited network bandwidth, such as in the Internet of things (IoT).[src] It must run over a transport protocol that provides ordered, lossless, bi-directional connections—typically, TCP/IP.[src] It is an open OASIS standard and an ISO recommendation (ISO/IEC 20922).[src] ==Overview== The MQTT protocol defines two types of network entities: a message broker and a number of clients.[src] An MQTT broker is a server that receives messages from publishing clients and then routes the messages to the appropriate destination clients.[src] An MQTT client is any device (from a microcontroller up to a full-fledged server) that runs an MQTT library and connects to an MQTT broker over a network.[src] Information is organized in a hierarchy of topics.[src] When a publisher has a new item of data to distribute, it sends a control message with the data to the connected broker.[src] The broker then distributes the information to any clients that have subscribed to that topic.[src] The publisher does not need to have any data on the number or locations of subscribers; and subscribers, in turn, do not have to be configured with any data about the publishers.[src] If a broker receives a message on a topic for which there are no current subscribers, the broker discards the message unless the publisher of the message designated the message as a retained message.[src] A retained message is a normal MQTT message with the retained flag set to true.[src] The broker stores the last retained message and the corresponding quality of service (QoS) for the selected topic.[src] Each client that subscribes to a topic pattern that matches the topic of the retained message receives the retained message immediately after they subscribe.[src] The broker stores only one retained message per topic.[src] This allows new subscribers to a topic to receive the most current value rather than waiting for the next update from a publisher.[src] When a publishing client first connects to the broker, it can set up a default message to be sent to subscribers if the broker detects that the publishing client has unexpectedly disconnected from the broker.[src] Clients only interact with a broker, but a system may contain several broker servers that exchange data based on their current subscribers' topics.[src] A minimal MQTT control message can be as little as two bytes of data.[src] A control message can carry nearly 256 megabytes of data if needed.[src] There are 14 defined message types used to connect and disconnect a client from a broker, to publish data, to acknowledge receipt of data, and to supervise the connection between client and server.[src] MQTT relies on the TCP protocol for data transmission.[src] A variant, MQTT-SN, is used over other transports such as UDP or Bluetooth.[src] MQTT sends connection credentials in plain text format and does not include any measures for security or authentication.[src] This can be provided by using TLS to encrypt and protect the transferred information against interception, modification or forgery.[src] The default unencrypted MQTT port is 1883.[src] The encrypted port is 8883.[src] ==Message types== ==Security== MQTT protocol version 3.1.1 requires the server (broker) to use a timeout that is one-and-a-half times the keepalive value specified by the client.[src] This (and similar keepalive functionalities in other protocols such as HTTP) enables a slow DoS attack published in 2020 called SlowITe, in which the attacker tries to open and maintain as many connections as possible, depriving legitimate users of their connections.[src] New variations of the attack and new detection/mitigation methods are topics of current research.[src] ==Clustering== The MQTT specification defines communication between a client and a single broker and does not specify communication between brokers.[src] Deployments that need more capacity or availability than a single broker provides rely on implementation-specific mechanisms.[src] The two common approaches are bridging, in which one broker connects to another broker as a client and forwards messages for selected topics, and clustering, in which a group of broker nodes shares subscription and session state and appears to clients as a single logical broker.[src] Eclipse Mosquitto implements bridging through broker configuration.[src] Clustered brokers such as EMQX and HiveMQ run as multi-node systems whose nodes share client sessions, topic subscriptions, and routing information.[src] A 2020 study that compared distributed deployments of three MQTT brokers on an edge-gateway cluster found substantial differences between implementations in throughput, latency, and message loss during node failure.[src]
41 sentences · 41 cited inline · 1 references stored
References
- MQTT · retrieved 2026-10-19 · rev 1378586122
Cite this reference
MLA "MQTT." Wikipedia. 2026-10-19. https://en.wikipedia.org/w/index.php?oldid=1378586122. Accessed 03 December 2026.
Chicago "MQTT." Wikipedia. 2026-10-19. https://en.wikipedia.org/w/index.php?oldid=1378586122.
APA Wikipedia. (2026). MQTT. Retrieved December 3, 2026, from https://en.wikipedia.org/w/index.php?oldid=1378586122
Cite this article
MLA
"MQTT." encyclopegia.org, 2026, https://encyclopegia.org/wiki/mqtt. Accessed 03 December 2026.
Chicago
"MQTT." encyclopegia.org. Accessed December 3, 2026. https://encyclopegia.org/wiki/mqtt.
APA
encyclopegia.org. (2026). MQTT. Retrieved December 3, 2026, from https://encyclopegia.org/wiki/mqtt
Accessed December 3, 2026 · CC BY-SA 4.0 · citation page · JSON
Claims
| Predicate | Value | Source |
|---|---|---|
| publication date | 2020 | Wikipedia |