https://github.com/fabryprog/historical-stream
Simple nodejs application to create a historical message broker pub/sub (using mqtt)
https://github.com/fabryprog/historical-stream
Last synced: 2 months ago
JSON representation
Simple nodejs application to create a historical message broker pub/sub (using mqtt)
- Host: GitHub
- URL: https://github.com/fabryprog/historical-stream
- Owner: Fabryprog
- License: apache-2.0
- Created: 2018-08-27T19:06:51.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-08-27T19:20:06.000Z (almost 7 years ago)
- Last Synced: 2025-02-12T08:57:13.917Z (4 months ago)
- Language: JavaScript
- Size: 7.81 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Historical Stream Data
Using MQTT to retrieve historical data (without db)
## Node.js usage
### Install node.js dependencies
> npm install
### Edit config file (config.js)
```
{
"connection": {
"url": "mqtt://localhost:1883"
},
"topic": {
"listen": [
"/test/+/topic"
],
"suffix": "/historical-stream"
},
"max": 5
}
```* connection.url = Mqtt broker connection url
* topic.listen = List of topic to support historical stream data
* topic.suffix = Topic to send historical stream data
* max = Max items on memory (every topic)### Launch
> nodejs index.js
## Docker
### Build
> docker build -t historical-stream .
### Edit config file (config.js)
### Launch
> docker run --name historical-stream -v $PWD/config.js:/usr/src/app/config.js historical-stream:latest