Subscribe to different MQTT brokers and topics simultaneously, and soak up what they have to offer. msoak is documented in it's man page of which there is a version as PDF.
Launch msoak with the example configuration file:
$ msoak example.config
Then publish a message:
mosquitto_pub -t tests/sponge/1 -m "$(jo name=Jane number=42)"
you should see the payload as formatted by Lua. The word loc
at start of output is the id of the connection as specified in example.config
. (jo is a utility to easily produce JSON output in a shell, and it may well be available as a package for your system of choice.)
loc tests/sponge/1 Hello Jane -> now=18:12:50Z
To test msoak, you will need a source of MQTT test traffic, This could be a test server or a production server that you run, or one of the public test servers. The example configuration assumes that you have a test server running on localhost; edit this to suit.
In order to build msoak
you will require:
Edit the Makefile
to select the system you are building for.
$ brew install lua libconfig mosquitto
$ make
# pkg install lua53 libconfig mosquitto
$ make
# pkg_add libconfig lua-5.3.5 mosquitto
$ make
# apt-get install libconfig-dev liblua5.3-dev libmosquitto-dev libbsd-dev
$ make
# apk add build-base libconfig-dev mosquitto-dev lua5.3-dev libbsd-dev
$ make