Stream Data Using MQTT

You can stream any data to multiple listeners at the same time. The publisher should publish the data using the below logic

This is very similar to Broadcast Message using MQTT except, the platform will not store or process the data

  • The connection to the MQTT server is as below
    • Host: v5.boodskap.io
    • Port: 1883
    • Client ID: Your Device Token
    • Username: Not required
    • Password: Not required
    • MQTT Topic /stream/domain/device/
      • domain Domain Key
      • device Device ID
    • Data
      • Any Data (JSON, Text, Binary, etc...)

❗️

QOS

MQTT QOS (Quality Of Service) should be always 0

Examples

import paho.mqtt.publish as publish

clientid = "YOUR DEVICE TOKEN"

topic = "/stream/MyDomain/MyDevice/mysecret/content"

payload = "Some encrypted content"

publish.single(hostname="v5.boodskap.io", topic=topic, payload=payload, qos=2, client_id=clientid)

Receiving Streamed Data

Multiple subscribers can listen to receive data concurrently

  • Subscribe to MQTT Topic: /stream/domain/device/
    • domain Domain Key
    • device Device ID