In this chapter, we will start our journey towards the usage of the preferred IoT publish-subscribe lightweight messaging protocol in diverse IoT solutions combined with mobile apps and web applications. We will learn how MQTT and its lightweight messaging system work. We will learn MQTT basics, the specific vocabulary for MQTT, and its working modes. We will use different utilities and diagrams to understand the most important concepts related to MQTT. We will:
Understand convenient scenarios for the MQTT protocol
Work with the publish-subscribe pattern
Work with message filtering
Learn basic concepts related to MQTT
Understand the MQTT puzzle: clients, servers or brokers, and connections
Install a Mosquitto MQTT server on Linux, macOS, or Windows
Publish messages
Subscribe to topics
Unsubscribe from topics
Work with best practices when creating topics
Understand wildcards
Learn about the different Quality of Service levels
Work with at least once delivery
Work with exactly once delivery