This software module transfers data for selected topics from an MQTT broker to another MQTT broker.
If you don't like to configure your MQTT broker for bridging you can choose this tool.
The solution is based on the mqttsub tool (https://gist.github.com/pvtom --> mqttsub.c)
mqttbridge needs the library libmosquitto. For installation please enter:
sudo apt-get install libmosquitto-dev
git clone https://github.com/pvtom/mqttbridge.git
cd mqttbridge
To build the program use
gcc mqttbridge.c -o mqttbridge -lmosquitto
Please start the program with
./mqttbridge
The available parameters will be displayed.
./mqttbridge --src_host host1 --dst_host host2 -t "smarthome/#" -t "devices/+/temperature"