MQTT plugin that broadcasts events to an MQTT broker. At the moment this plugin only broadcasts but might be extended with additional features as well as including an MQTT server so users won't have to run a separate MQTT broker.
If you have any feature requests don't forget to open an Issue.
If you find this or other plugins useful please consider voting for deadlock delegate on Solar or Ark networks.
Before restarting your process, you need to add the plugin into the very end core.plugins or relay.plugins section of app.json file:
{
"package": "@deadlock-delegate/mqtt",
"options": {
"enabled": true,
"events": ["block.forged"],
"topic": "ark/events",
"mqttBroker": "mqtt://localhost:1883"
}
}- Install plugin:
<command> plugin:install @deadlock-delegate/mqtt, eg:ark plugin:install @deadlock-delegate/mqttorsolar plugin:install @deadlock-delegate/mqtt - Add plugin to
app.json - Start your node as you usually start it
You can run a development MQTT broker by navigating to etc/ directory in this project a run docker-compose up. This will start a MQTT broker in docker.
Assuming you don't run testnet locally via docker:
- Clone this plugin into
plugins/directory of thecoreproject - Add plugin to
app.json, for testnet the file can be found in:core/packages/core/bin/config/testnet/app.json - Go into the plugin's directory:
cd mqtt - Build plugin:
yarn build - Run
yarn full:testnetinsidecore/packages/coredirectory to start testnet with mqtt plugin
MIT © deadlock delegate