This plugin may be useful for your consumer application to process notifications from an array of lightning nodes or ensuring that no notifcations are missed in case of an application failure.
This has been tested with RabbitMQ.
clightningjs
[https://github.com/lightningd/clightningjs]amqplib
[https://github.com/squaremo/amqp.node]
- Clone plugin to your c-lightning plugin directory.
- Ensure
amqp-relay.js
is executable. - Run
npm install
to install required dependencies.
This plugin connects to an AMQP exchange specified with startup options as follows:
amqp-host
: the host address in address:port formatamqp-auth
: the optional service credentials in user:pass formatamqp-exchange
: the name of the exchange you wish to send throughamqp-prefix
: an optional message prefix for routing (default islightningd.message.
)amqp-delay
: an optional relay delay in ms (suitable forx-delayed-message
type exchanges)amqp-notifications
: a comma seperated list of notifications to relay. Notification types are listed here. Note also thatwarning
notifications are not implemented yet.
It will attempt reconnection every 10 seconds on startup if a host, exchange & notification list are provided.
There are no exposed RPC methods and no c-lightning hooks are used.