What is MQTT | How does MQTT work? - CodeTextPro

What is MQTT? , Full Form of MQTT? , How does MQTT work? , What are the benefits of using MQTT? ,What are the drawbacks of MQTT?



MQTT (MQ Telemetry Transport) is a lightweight open messaging protocol that provides resource-constrained network clients with a simple way to distribute telemetry information in low-bandwidth environments. The protocol, which employs a publish/subscribe communication pattern, is used for machine-to-machine (M2M) communication.

While the TT in MQTT stands for Telemetry Transport, the MQ is in reference to a product called IBM MQ. Although the spell-out for MQTT is sometimes given as Message Queuing Telemetry Transport, there is no message queuing in MQTT communication.

How does MQTT work?

MQTT clients include publishers and subscribers, terms that refer to whether the client is publishing messages or subscribed to receive messages. These two functions can be implemented in the same MQTT client. When a device (or client) wants to send data to a server (or broker) it is called a publish. When the operation is reversed, it is called a subscribe. Under the pub/sub model,
multiple clients can connect to a broker and subscribe to topics in which they are interested.

If the connection from a subscribing client to a broker is broken, then the broker will buffer messages and push them out to the subscriber when it is back online. If the connection from the
publishing client to the broker is disconnected without notice, then the broker can close the connection and send subscribers a cached message with instructions from the publisher.

What are the benefits of using MQTT?

The lightweight properties and minimum overhead of the MQTT protocol architecture help ensure smooth data transfer with low bandwidth and reduce the load on the CPU and RAM. Among MQTT's advantages over competing protocols are the following:

  • efficient data transmission and quick to implement, due to its being a lightweight protocol;
  • low network usage, due to minimized data packets;
  • efficient distribution of data;
  • successful implementation of remote sensing and control;
  • fast, efficient message delivery;
  • uses small amounts of power, which is good for the connected devices; and
  • optimizes network bandwidth.
What are the drawbacks of MQTT?

Potential downsides to MQTT include the following:

  • MQTT has slower transmit cycles compared to Constrained Application Protocol (CoAP).
  • MQTT's resource discovery works on flexible topic subscription, whereas CoAP uses a stable resource discovery system.
  • MQTT is unencrypted. Instead, it uses TLS/SSL (Transport Layer Security/Secure Sockets Layer) for security encryption.
  • It is difficult to create a globally scalable MQTT network.
  • Other MQTT challenges relate to security, interoperability and authentication.

Post a Comment

0 Comments