MQTT in Detail
This chapter touches on one of the main topics of this book: MQTT. As you saw in the previous chapter, when we used our Raspberry Pi as an MQTT client, it was straightforward and included just one command that needed to be executed. But the question is, how does the client connect to the broker, and how does it send the message to the intended client?
This chapter will address that exact point. It will significantly help you learn what MQTT is and how it works under the hood. You will gain a clear understanding of this communication protocol, along with the ability to use your laptops and computers as local MQTT clients, which is a bonus.
We’re going to cover the following main topics in this chapter:
- Introducing MQTT clients
- Understanding the MQTT protocol packet structure
- Practical demonstration of MQTT in action
Let’s go ahead and begin.