Skip to main content

LightDB Stream

LightDB Stream Device Service definitions over MQTT.

How to use guides:


MethodDescriptionPathContent Format
PublishSend data/.s/{path=**}JSON
SubscribeGet latest data/.s/{path=**}JSON

path can be any valid URI sub path. Ex:



To demonstrate the operations here, let's imagine that we are tracking an asset using an IoT device. The location data from our device is going to periodically pushed to a LightDB Stream.

Parameters and attributes that are known:

t or ts or time or timestampTimestamp of the datapointnow()

The body can be a JSON/CBOR object or a single value in the following formats:

  • boolean
  • float
  • integer
  • string

You can also send a batch request by sending an array at the root level and with different timestamps:

$ mosquitto_pub -i deadbeef-id -L mqtts://deadbeef-id:[email protected]:1883/.s/position -m "[{\"ts\": 1626362266059, \"latitude\": 37.75, \"longitude\" : -122.57, \"speed\": 5 }, {\"ts\": 1626362276059, \"latitude\": 38.75, \"longitude\" : -123.57, \"speed\": 10 }]"