This fully configurable MQTT bridge subscribes to MQTT broker for defined topic and streams messages published to that topic to dynamically defined backends. The configured backends subscribe to simple data and flush events which give them access to the message topic and content whenever new messages for the defined topic arrive.
New backends will be added, if you don't see what you need, contribute.
If your broker does not require secure client, simply switch the secure and remove the no longer needed elements from the args: keyPath, certPath. If no authentication is required you can further remove the username and password arguments. For each one of these use-cases, the MQTT broker will also need require a different port.
The small keepalive is to workaround for AWS ELB timeouts. Feel free to increase that number if you are not load-balancing the MQTT broker.
For each backend, you must define two arguments: handler with the implementation file (probably located in the backends directory) and the config arguments for that backend. These will be anything the backend requires.
Remember, some backends require additional installation before the initial run.
To change the verbosity of console logging, you can alter the level argument. See winston documentation for mqtt-bridge supported levels (debug, info, warn, error).
To run the mqtt-bridge as a standalone app, simply use the provided start-bridge.sh scripts which will provision forever to assure continuous uptime.