-
Notifications
You must be signed in to change notification settings - Fork 0
Topics
All these topics are published with retain flag set to true by mqttDB.
Publishes 1
when mqttDB is started and connected to the broker, publishes 2
when all documents and views are initially published, publishes 0
by last will testament when mqttDB is disconnected from the broker. Clients that modify documents or views should subscribe to this topic and be aware that no changes can be carried out when the payload is 0
.
Publishes the database revision. This is just a number that gets incremented every time a document was created, modified or deleted.
All documents are published retained on these topics. Payload is usually a JSON object, in case of a deleted document it's an empty string.
All views are published retained on these topics. Payload is usually a JSON object, in case of a deleted view it's an empty string.
On the following topics clients must not publish with the retain flag set to true. Clients should check the $db/connected
topic before publishing on these topics (see above).
Trigger a publication of a document. Payload is irrelevant.
Trigger a publication of a view. Payload is irrelevant.
Create, overwrite or delete a document. Payload has to be a JSON object or - for deletion - an empty string.
Extend a document (overwrite only given properties of the document). Payload has to be a JSON object.
Set/overwrite, create or delete document properties. Examples Payloads:
{"method":"set", "prop": "name", "val": "new name!"}
{"method":"create", "prop": "name", "val": "new name!"}
{"method":"del", "prop": "name"}
You can use dot-Notation for prop
to access nested properties.
In contrast to the set
method create
won't overwrite existing properties.
Create, overwrite or delete a view.
Payload has to be a JSON object with a mandatory map
attribute and the optional attributes reduce
and filter
. Use an empty string payload to delete a view.
See Views for an in-depth description on how to work with views.
mqttDB copyright (c) 2017 Sebastian Raff. MIT License