Book Image

MQTT Essentials - A Lightweight IoT Protocol

5 (1)
Book Image

MQTT Essentials - A Lightweight IoT Protocol

5 (1)

Overview of this book

This step-by-step guide will help you gain a deep understanding of the lightweight MQTT protocol. We’ll begin with the specific vocabulary of MQTT and its working modes, followed by installing a Mosquitto MQTT broker. Then, you will use best practices to secure the MQTT Mosquitto broker to ensure that only authorized clients are able to publish and receive messages. Once you have secured the broker with the appropriate configuration, you will develop a solution that controls a drone with Python. Further on, you will use Python on a Raspberry Pi 3 board to process commands and Python on Intel Boards (Joule, Edison and Galileo). You will then connect to the MQTT broker, subscribe to topics, send messages, and receive messages in Python. You will also develop a solution that interacts with sensors in Java by working with MQTT messages. Moving forward, you will work with an asynchronous API with callbacks to make the sensors interact with MQTT messages. Following the same process, you will develop an iOS app with Swift 3, build a website that uses WebSockets to connect to the MQTT broker, and control home automation devices with HTML5, JavaScript code, Node.js and MQTT messages
Table of Contents (16 chapters)
MQTT Essentials - A Lightweight IoT Protocol
Credits
About the Author
Acknowledgment
About the Reviewer
www.PacktPub.com
Customer Feedback
Dedication
Preface

Test your knowledge


  1. Which of the following can we use to secure and encrypt communications between the MQTT clients and the MQTT server?

    1. TLS.

    2. TCP.

    3. HTTPS.

  2. Which is the default port number for MQTT over TLS?

    1. 1883.

    2. 9883.

    3. 8883.

  3. If we specify true as the value for the require_certificate option of the Mosquitto configuration file:

    1. Clients that want to connect to the MQTT server will require a client certificate.

    2. Clients that want to connect to the MQTT server won't require a client certificate.

    3. Clients that want to connect to the MQTT server can provide an optional client certificate.

  4. Which of the following utilities allows us to generate an X.509 digital certificate?

    1. OpenX509.

    2. OpenSSL.

    3. TLS4You.

  5. When we use MQTT over TLS:

    1. There is just a small bandwidth overhead but no processing overhead at all compared with MQTT over TCP without TLS.

    2. There are both bandwidth and processing overheads compared with MQTT over TCP without TLS.

    3. There is no overhead compared with MQTT over TCP without TLS.