Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/robertslando/mqtt-jsonl-store
JSONL store for in-flight MQTT.js packets.
https://github.com/robertslando/mqtt-jsonl-store
Last synced: 11 days ago
JSON representation
JSONL store for in-flight MQTT.js packets.
- Host: GitHub
- URL: https://github.com/robertslando/mqtt-jsonl-store
- Owner: robertsLando
- License: mit
- Created: 2022-11-14T10:29:17.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-01-25T14:01:54.000Z (10 months ago)
- Last Synced: 2024-10-05T13:21:00.216Z (about 1 month ago)
- Language: TypeScript
- Size: 2.09 MB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# mqtt-jsonl-store
JSONL store for in-flight MQTT.js packets. Powered by [jsonl-db](https://github.com/AlCalzone/jsonl-db).
[![CI](https://github.com/robertsLando/mqtt-jsonl-store/actions/workflows/ci.yml/badge.svg)](https://github.com/robertsLando/mqtt-jsonl-store/actions/workflows/ci.yml)
[![node](https://img.shields.io/node/v/mqtt-jsonl-store.svg) ![npm](https://img.shields.io/npm/v/mqtt-jsonl-store.svg)](https://www.npmjs.com/package/mqtt-jsonl-store)
## Installation
```bash
npm install mqtt-jsonl-store
```## Usage
```js
const mqtt = require("mqtt");
const { Manager } = require("mqtt-jsonl-store");const manager = new Manager("path/to/store");
async function main() {
await manager.open();
const client = mqtt.connect("mqtt://localhost", {
incomingStore: manager.incoming,
outgoingStore: manager.outgoing,
});
}main();
```