MQTT

MQTT (originally an initialism of MQ Telemetry Transport[a]) is a lightweight, publish–subscribe, machine-to-machine network protocol for message queue/message queuing service.

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).

Andy Stanford-Clark (IBM) and Arlen Nipper (then working for Eurotech, Inc.) authored the first version of the protocol in 1999.

[6] The goal was to have a protocol that is bandwidth-efficient, lightweight and uses little battery power, because the devices were connected via satellite link, which was extremely expensive at that time.

[8] In the specification opened by IBM, as version 3.1, the protocol was referred to as "MQ Telemetry Transport".

[16] The MQTT protocol defines two types of network entities: a message broker and a number of clients.

MQTT sends connection credentials in plain text format and does not include any measures for security or authentication.

MQTT clients don't use a direct connection address of the intended recipient, but use the subject line called "Topic".

MQTT, if configured to, can use TLS encryption with certificate, username and password protected connections.

Backup brokers can also be set up to share the load of clients across multiple servers on site, in the cloud, or a combination of these.

[22] The main advantages of an MQTT broker are: Waits for a connection to be established with the server and creates a link between the nodes.

[24] These are classified in increasing order of overhead: This field does not affect handling of the underlying TCP data transmissions; it is only used between MQTT senders and receivers.

[27] As an efficient and lightweight messaging protocol, MQTT clustering allows for the creation of a resilient network of interconnected broker nodes, ensuring continuous and reliable message delivery even in the face of hardware failures or network disruptions.

Example of an MQTT connection (QoS 0) with connect, publish/subscribe, and disconnect. The first message from client B is stored due to the retain flag.