@koerber/mqtt-simple-level-store
v1.0.0
Published
A simple level-backed store for MQTT.js
Downloads
2
Readme
MQTT.js Level Simple Store
This project implements a Store
as required by MQTT.js, backed by a
simple level database.
This is basically equivalent to the already-existing
mqtt-level-store project,
but sans the level-sublevel
dependancy, and without double-lookups for
messages.
Usage
Very simply:
const mqtt = require('mqtt')
const simple = require('@koerber/mqtt-simple-level-store')
const outgoingStore = simple('/path/to/our/db/outgoing')
const incomingStore = simple('/somewhere/else/incoming')
const client = mqtt.connect('mqtts://some_mqtt_host:1234/', {
outgoingStore,
incomingStore,
// ... other options
})