The basics of MQTT

Let's go over a few terms, then link them together to define MQTT as a concept:

  • MQTT message: An MQTT message consists of a topic and a message. The topic is what clients subscribe to, and they usually read the messages for data.
  • MQTT client: An MQTT client connects to an MQTT broker and can subscribe to and publish on topics once connected to the broker. 
  • MQTT broker: An MQTT broker handles client connection and passes messages along to all clients subscribed to a topic when a client publishes a message on that topic. It can also publish messages to topics, which go to all clients subscribed.

In our project, we will set up our Pi as an MQTT client, connect it to a broker at AdafruitIO, and publish messages that the broker will send to the client (our Pi) and takes in messages it publishes. 

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.137.171.121