@koerber/mqtt-simple-level-store

1.0.0 • Public • Published

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
})

Readme

Keywords

Package Sidebar

Install

npm i @koerber/mqtt-simple-level-store

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

5.54 kB

Total Files

4

Last publish

Collaborators

  • diego_rapela