Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/inhedron/mqtt-repeater
The repeater tool of the messages that you have chosen from a mqtt broker to another mqtt broker
https://github.com/inhedron/mqtt-repeater
mqtt pubsub repeater
Last synced: about 2 months ago
JSON representation
The repeater tool of the messages that you have chosen from a mqtt broker to another mqtt broker
- Host: GitHub
- URL: https://github.com/inhedron/mqtt-repeater
- Owner: inhedron
- License: gpl-3.0
- Created: 2017-10-31T12:36:44.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2017-11-02T09:09:56.000Z (about 7 years ago)
- Last Synced: 2024-10-29T05:48:19.724Z (3 months ago)
- Topics: mqtt, pubsub, repeater
- Language: JavaScript
- Homepage:
- Size: 17.6 KB
- Stars: 2
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# mqtt-repeater
This NodeJS application publishes messages from a mqtt broker to another mqtt broker. You can set the topic that you want to exchange by environment variables.
Example
=======Clone the repository
```bash
$ git clone https://github.com/inhedron/mqtt-repeater.git
$ cd mqtt-repeater
$ npm install
```You can set options by environment variables
```bash
$ TARGET_MQTT_HOST="mqtt://192.168.0.2" SOURCE_MQTT_HOST="mqtt://192.168.0.1" node index.js
```If you run the application with this config the application read all messages from the broker that installed on 192.168.0.1 and publish them to the broker that installed on 192.168.0.2. For details please check the config.js file at the source tree or check the options stage.
### Options
Option | Type | Default | Description
-----------------------|---------------|----------------------|----------------------------
SOURCE_MQTT_HOST | String | mqtt://broker | Hostname or ip address of the source broker that you want to read messages
SOURCE_MQTT_CONF | JSON | {"clean": false, "port": 1885, "clientId": "mqtt-repeater-source-client"} | The configuration of the source broker
TARGET_MQTT_HOST | String | mqtt://broker | Hostname or ip address of the source broker that you want to publish messages
SOURCE_MQTT_CONF | JSON | {"clean": false, "port": 1883, "clientId": "mqtt-repeater-target-client"} | The configuration of the target broker
SUBSCRIPTIONS | Array | ["#"] | The subscribe list of the messages. The application subscribe all of them, read messages from these topics and publish them to target broker