What is an MQTT Broker Clearly Explained

What is an MQTT Broker Clearly Explained

This video takes a deeper look at MQTT to see what the central server, called the “broker”, is capable of. The communication model of MQTT offers a lot of benefits over the traditional poll and response model. In this tutorial we’ll take a look at an MQTT broker what advantages it can provide for IoT and IIoT applications.

In this video you will learn:
– How the MQTT model works
– What an MQTT broker is and where it can run
– Useful features and functionality that the broker provides
– Retain Messages
– Birth, Death, and Last Will and Testament Messages

Learn more at

All Opto 22 products are designed, manufactured, and supported in the U.S.A. from our Temecula, California headquarters and factory.

49 thoughts on “What is an MQTT Broker Clearly Explained

  1. at 7:04 you say retained messages are just a copy of the most recent message. But cant there be more than one? I could swear the Q in MQTT is for queue… Nice video though!

  2. really appreciate the way you have made and edited this video, i likes the way you gave tiny sound to each graphics that makes it look it more alive

  3. From what i understand, MQTT just requires a network to be made, not the actual internet right? I'm using AWS greengrass and planning to have 2 devices communicate locally over mqtt, what would happen if there is no internet connectivity with the cloud?

  4. does all mqtt broker supports Retain Messages, Birth, Death, and Last Will and Testament Messages? i am planning to use mosquitto broker and i dont know if it support those functions

  5. Thanks. I just came looking for MQTT primer and yours is excellent! Will be checking out your other videos as time permits.

  6. Very good video, now bookmarked! Came here following references originating from home-assistant.io, which I'm just learning.

  7. Excellent Video to Understand MTTQ.
    Pls Answer
    1 thing I want to ask, which software you use to make this Animation Videos.

  8. MQTT while connected to 1883 port but at port 8883 it shows the TLS/SSL error. Could you please explain why this happens like that?

  9. Maybe someone can elaborate on this:
    a security feature of MQTT apparently is, that devices are not aware of other devices due to the publish/subscribe methodology.
    But if the broker sends out Birth/death/LWT messages out to other devices, other devices will become aware of other devices and can notify or attempt reboots. That's a contradiction, isn't it?

  10. Great explanation, we are attempting to use this protocol I have wondered how it works. Can anyone tell me if there are networks of IOT developers here with in the USA that we can post a project to?

  11. I'm always liked to watch your videos: your speach is so clear and structured that after I watched any of your tuts – I feel that I'm already an expert on the topic. Thank you for that!!!

  12. what a nice explanation about brokers and mqtt functionality! great! good work! May i use your the video info (w/the correspondig intelectual property credits) in a document i'm working on? thank you in advance!

  13. MQTT Broker:

    A software running on a computer (running on premises or in the cloud), could be self-built or hosted by 3rd party. Available as open source and proprietary with extra features added.

    Broker acts as a post office, MQTT doesn’t use the address of the intended recipient but uses the subject line called “Topic”, and anyone who wants a copy of that message will subscribes to that topic.

    Multiple clients can receive the message from a single broker (one to many capability). Similar, multiple publisher can publish topics to a single subscriber (many to one).

    Each client can both produce and subscribe the date by both publishing and subscribing, i.e. the devices can publish sensor data and still be able to receive the configuration information or control commands (MQQT is bidirectional communication protocol). This helps in both sharing data, managing and controlling devices.

    With MQTT broker architecture the devices and application becomes decoupled and more secure. MQTT uses TLS (Transport Layer Security) encryption with user name, password protected connections and optional certifications that requires clients to provide certificate file that matches with the server certificate. Each client are unaware of others IP address.

    In case of a single source of failure, broker software and clients has an automatic handover to Redundant/ automatic backup broker. The backup broker can also be setup to share the load of clients across multiple servers onsite, could or the combination of both.

    The broker can support both standard MQTT and MQTT for compliant specifications such as Sprakplug, can be done with the same server, same time and with the same levels of security.

    Broker is will store the data in form of retained messages (need to subscribe with database client) so that new subscribers to the topic can get the last vale straight away.

    The broker also keeps track of all the session’s information as the devices goes on and off called “persistent sessions”.

    The broker also handles the birth, death and “last will and testament” messages for the clients, these messages are sent to the broker when a client first connects along with the keep alive timer. This keeps the system healthy by putting subscribers in place to listen to birth, death and will messages and react accordingly by:

    · Monitor connections status

    · Assign responsibilities

    · Automatic redundancy

    · Notify users

    MQTT provides the tools to monitor and maintain an entire system will keeping network traffic low due to variable “keep alive timer” and the tiny load of heart beat packets

    The main advantages of MQTT broker are:

    1. Eliminates vulnerable and insecure client connections

    2. Can easily scale from single devices to thousands

    3. Manages and tracks all client connection states, including security credentials and certificates

    4. Reduced network strain without compromising the security (cellular or satellite network)

Leave a Reply

Your email address will not be published. Required fields are marked *