Test your knowledge

Let's see whether you can answer the following questions correctly:

  1. The PubNub MQTT interface requires us to use a client ID composed as follows:
    1. publish_key/subscribe_key/device_id
    2. device_id/publish_key/subscribe_key
    3. publish_key/device_id
  2. When we publish a message to the PubNub MQTT interface:
    1. It is only available on the PubNub MQTT subnetwork
    2. It becomes available on the PubNub network
    3. It requires a specific payload prefix to become available on the PubNub network
  1. Which of the following methods of the paho.mqtt.client.Client instance allows us to specify the callback function that the client has to call when it receives a message in a specific topic:
    1. message_callback_add
    2. message_arrived_to_topic_callback
    3. message_on_topic ...

Get Hands-On MQTT Programming with Python now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.