Due to its open nature, there are a vast amount of MQTT client libraries around. There is a good chance that your favorite programming language offers an MQTT library as well. In the following sections, we will have a short look at MQTT libraries for two programming languages that are relevant to us: Arduino and JavaScript.
Understanding MQTT libraries
Arduino libraries
There are various MQTT libraries around for Arduino, three of the most popular being arduino-mqtt (https://github.com/256dpi/arduino-mqtt), pubsubclient (https://github.com/knolleary/pubsubclient), and the Adafruit MQTT library (https://github.com/adafruit/Adafruit_MQTT_Library). Some of them are only compatible with certain development boards; also, their implementations...