O'Reilly logo

Hands-On MQTT Programming with Python by Gaston C. Hillar

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Working with retained last will messages

Now, we will check what happens when the MQTT client that controls the vehicle disconnects unexpectedly from the MQTT server and our vehicle remote control application disconnects unexpectedly, too. Pay attention to all the steps because we will manually interrupt the execution of both programs to understand a specific problem that we will solve by taking advantage of the last will and testament feature combined with the retained flag value.

You will have to be quick to run the next steps. Hence, make sure you read all the steps and then execute them.

Execute the following line to start the vehicle remote control example on any computer or device that you want to use as the MQTT client and uses Linux ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required