A small wrapper around the MQTT.js client and an API to query retained topics via HTTP.
JSON.stringifyall published payloads
JSON.parseall incoming payloads
var topping = default;var client = topping;client;
The query API allows single and batch queries including wildcard topics via HTTP. It specifically supports JSON payloads and parses them if possible. Multiple results of a batch, wildcard or flattened query are structured as
Array of results. A single result has the format:
topic: Stringpayload: PAYLOADchildren?: CHILDREN// PAYLOAD = The JSON parsed payload// CHILDREN = An array of subtopic results
result.payload contains the raw payload as String. Default is
Specifies the recursive depth of the query. A
depth > 0 returns subtopic results in
result.children. Default is
Flattens all results into a flat array of results. Default is
The queryJson API allows single and batch queries via HTTP. Multiple results of a batch query are structured as
Array of results. A single result is an object containing subtopics as properties. The subtopics may be objects with subtopics or the json parsed payload.