MQTT is a standards-based messaging protocol, or set of rules, used for machine-to-machine communication. Smart sensors, wearables, and other Internet of Things (IoT) devices typically have to transmit and receive data over a resource-constrained network with limited bandwidth. These IoT devices use MQTT for data transmission, as it is easy to implement and can communicate IoT data efficiently. MQTT supports messaging between devices to the cloud and the cloud to the device.","id":"seo-faq-pairs#what-is-mqtt","customSort":"1"},"metadata":{"tags":[{"id":"seo-faq-pairs#faq-collections#mqtt","name":"mqtt","namespaceId":"seo-faq-pairs#faq-collections","description":"

mqtt","metadata":{}}]}},{"fields":{"faqQuestion":"Why is the MQTT protocol important?","faqAnswer":"

The MQTT protocol has become a standard for IoT data transmission because it delivers the following benefits: \n

Lightweight and efficient \n

MQTT implementation on the IoT device requires minimal resources, so it can even be used on small microcontrollers. For example, a minimal MQTT control message can be as little as two data bytes. MQTT message headers are also small so that you can optimize network bandwidth. \n

Scalable \n

MQTT implementation requires a minimal amount of code that consumes very little power in operations. The protocol also has built-in features to support communication with a large number of IoT devices. Hence, you can implement the MQTT protocol to connect with millions of these devices. \n

Reliable \n

Many IoT devices connect over unreliable cellular networks with low bandwidth and high latency. MQTT has built-in features that reduce the time the IoT device takes to reconnect with the cloud. It also defines three different quality-of-service levels to ensure reliability for IoT use cases— at most once (0), at least once (1), and exactly once (2). \n

Secure \n

MQTT makes it easy for developers to encrypt messages and authenticate devices and users using modern authentication protocols, such as OAuth, TLS1.3, Customer Managed Certificates, and more. \n

Well-supported \n

Several languages like Python have extensive support for MQTT protocol implementation. Hence, developers can quickly implement it with minimal coding in any type of application.","id":"seo-faq-pairs#why-is-mqtt-imp","customSort":"2"},"metadata":{"tags":[{"id":"seo-faq-pairs#faq-collections#mqtt","name":"mqtt","namespaceId":"seo-faq-pairs#faq-collections","description":"

mqtt","metadata":{}}]}},{"fields":{"faqQuestion":"What is the history behind MQTT protocol?","faqAnswer":"

The MQTT protocol was invented in 1999 for use in the oil and gas industry. Engineers needed a protocol for minimal bandwidth and minimal battery loss to monitor oil pipelines via satellite. Initially, the protocol was known as Message Queuing Telemetry Transport due to the IBM product MQ Series that first supported its initial phase. In 2010, IBM released MQTT 3.1 as a free and open protocol for anyone to implement, which was then submitted, in 2013, to Organization for the Advancement of Structured Information Standards (OASIS) specification body for maintenance. In 2019, an upgraded MQTT version 5 was released by OASIS. Now MQTT is no longer an acronym but is considered to be the official name of the protocol. ","id":"seo-faq-pairs#what-is-history-behind-mqtt","customSort":"3"},"metadata":{"tags":[{"id":"seo-faq-pairs#faq-collections#mqtt","name":"mqtt","namespaceId":"seo-faq-pairs#faq-collections","description":"

mqtt","metadata":{}}]}},{"fields":{"faqQuestion":"What is the principle behind MQTT?","faqAnswer":"

The MQTT protocol works on the principles of the publish/subscribe model. In traditional network communication, clients and servers communicate with each other directly. The clients request resources or data from the server, then the server processes and sends back a response. However, MQTT uses a publish/subscribe pattern to decouple the message sender (publisher) from the message receiver (subscriber). Instead, a third component, called a message broker, handles the communication between publishers and subscribers. The broker’s job is to filter all incoming messages from publishers and distribute them correctly to subscribers. The broker decouples the publishers and subscribers as below: \n

Space decoupling \n

The publisher and subscriber are not aware of each other’s network location and do not exchange information such as IP addresses or port numbers. \n

Time decoupling \n

The publisher and subscriber don’t run or have network connectivity at the same time. \n

Synchronization decoupling \n

Both publishers and subscribers can send or receive messages without interrupting each other. For example, the subscriber does not have to wait for the publisher to send a message.","id":"seo-faq-pairs#what-is-the-principle-mqtt","customSort":"4"},"metadata":{"tags":[{"id":"seo-faq-pairs#faq-collections#mqtt","name":"mqtt","namespaceId":"seo-faq-pairs#faq-collections","description":"

mqtt","metadata":{}}]}},{"fields":{"faqQuestion":"What are MQTT components?","faqAnswer":"

MQTT implements the publish/subscribe model by defining clients and brokers as below. \n

MQTT client \n

An MQTT client is any device from a server to a microcontroller that runs an MQTT library. If the client is sending messages, it acts as a publisher, and if it is receiving messages, it acts as a receiver. Basically, any device that communicates using MQTT over a network can be called an MQTT client device. \n

MQTT broker \n

The MQTT broker is the backend system which coordinates messages between the different clients. Responsibilities of the broker include receiving and filtering messages, identifying clients subscribed to each message, and sending them the messages. It is also responsible for other tasks such as: \n

AWS MQTT next steps

Check out additional product-related resources
Learn more about Internet of Things Services 
Sign up for a free account

Instantly get access to the AWS free tier. 

Sign up 
Start building in the console

Get started building with AWS in the AWS Management Console.

Sign in