This program subscribes to an MQTT topic and republishes all incoming messages to a NATS server
- Go 1.19.1+ (probably works with older versions too!)
./build_all.sh
will generate the binary mqtt-to-nats
./mqtt-to-nats --help
will show all the supported options for the program
docker build -t mqtt-to-nats .
will build the mqtt-to-nats
docker image based on alpine.
docker run --rm mqtt-to-nats -h <mqtt_broker> -t <topic> -N <nats_url> -SN <stream_name>
will run a docker container forwarding all messages from an MQTT broker to a NATS stream.
- don't rush it