In this blog, we will learn how to subscribe and publish MQTT messages using ESP8266 (NodeMcu). We will use the Raspberry pi as a Local mosquitto MQTT broker.