sudo apt update -y && sudo apt install mosquitto mosquitto-clients -y
sudo apt-get install libmosquitto-dev
This programm is emplemented in C++ using Mosquitto dev. The Publisher receives information like host name and port number to stablish a connection to the broker and deliver a message.
This programm is emplemented in C++ using Mosquitto dev. The Subscriber receives information like host name and port number to stablish a connection to the broker and listen for messages.
To build this programm follow the following instructions:
- install CMake
sudo apt-get install cmake cmake-qt-gui
the last part install the graphic interface. This could be left out.
- open the terminal
- insert the following commads:
mkdir ./build
cmake -S ./ -B ./build
make -C ./build
Once the last step was successfully executed, then the following line can be inserted:
./build/MQTT