d
WE ARE EXPERTS IN TECHNOLOGY

Let’s Work Together

n

StatusNeo

MQTT – IoT Messaging Protocol

Introduction

  • MQTT is a standard messaging protocol for IoT( Internet Of Things).
  • It follows the OASIS( Organization for the Advancement of Structured Information Standards ) standards.
  • It is a very lightweight pub-sub(Publish and Subscribe) messaging transport for IoT devices.
  • It provides bidirectional communication.
  • Encryption of messages is very easy.
  • The message delivery system is very reliable.
  • MQTT is used in – Logistics, smart homes, manufacturing, smart cities, and many more.

Client

  • An MQTT Client is a device such as a microcontroller.
  • Every client has a separate ID or name.
  • The client name must be unique.
  • Every Client connects to an MQTT broker over a network.
  • Publisher and subscriber both are MQTT clients.
  • Every client connects to a broker to talk to another client.
  • No two clients can communicate without the help of a broker.

Broker

  • The broker is the one that manages the communication between publisher and subscriber.
  • It can be called the heart of the MQTT.
  • A single broker can handle up to millions of active connections.
  • It also supports session maintenance and data recovery.
  • Authentication and Authorization are also done at the broker’s end.
  • Every message that is published passes through a broker.

Topic/Subscription

  • The topic is a string that is used for sending messages.
  • The broker uses the topic to distinguish between messages, like which message is for which topic.
  • Every subscriber subscribes to a topic so as to receive the messages published on that topic.
  • The topic is similar to an API path in that is it can be hierarchically separated by /.
  • An example of one topic is car/front/ac/temperature.
  • A wildcard + symbol is used to define that any value can be fitted there.
  • An example of a wildcard – car/+/ac/temperature. here in + sign can have any values like front or back.
  • For defining the multi-level hierarchy # symbol is used.
  • An example of a multi-level hierarchy is – car/#, it will cover anything that starts with car/.
  • Topics are also known as subscriptions.

Quality Of Service (QoS)

  • Quality of service means how better the communication will be.
  • There are 3 QoS defined in MQTT – 0, 1, 2
  • 0 means the message will be delivered without any confirmation.
  • 1 means the message will be delivered at least once with confirmation.
  • 2 means the message will be delivered exactly once with 4 part hand-shake.
  • QoS is the best way of communication with all the security but all the slowest.

References-

  • https://mqtt.org/

Still Curious? Visit my website to know more!

For more interesting Blogs Visit- Utkarsh Shukla Author

I am a versatile professional who specializes in empowering businesses with digital solutions. With expertise in software engineering consulting, I provide valuable guidance and support to companies seeking to enhance their technological capabilities. Additionally, I excel as a host(Professionals Unplugged), author, poet, and photographer. This diverse skill set allows me to creatively express my thoughts and ideas through various mediums. As a host, I engage audiences and facilitate insightful conversations. As an author, my writings offer valuable insights and knowledge. As a poet, I capture emotions and experiences through the power of words. And as a photographer, I have a keen eye for capturing captivating visuals. Overall, my wide range of skills and experiences make me a valuable asset in the world of digital solutions and creative expression

Add Comment