Understanding MQTT Clean Sessions

Опубликовано: 13 Ноябрь 2024
на канале: Steve Cope
9,080
131

http://www.steves-internet-guide.com/... -

When a client connects to a broker it can connect using either
• a non persistent connection (clean session) or
• a persistent connection..
With a non persistent connection the broker doesn’t store any subscription information or undelivered messages for the client.
This mode is ideal when the client only publishes messages.
It can also connect as a so called durable client using a persistent connection.
In this mode the broker will store subscription information, and undelivered messages for the client.


Using a demo Python script we look at clean sessions and demonstrate the broker remembering subscriptions and storing messages.


Resources:
Code download
http://www.steves-internet-guide.com/...

Related videos

MQTT Keep Alives Explained
   • MQTT Keep Alives Explained (With Exam...  
-------------
Python MQTT Client The Loop and Callbacks explained
   • Python MQTT Client The Loop and Callb...  


If you find these videos useful then you might want to consider buying me a coffee
https://www.paypal.me/StepenCope