Get async_mqtt and build examples

git clone https://github.com/redboltz/async_mqtt.git
cd async_mqtt
mkdir build
cd build
cmake  -DASYNC_MQTT_USE_LOG=ON -DASYNC_MQTT_BUILD_EXAMPLES=ON ..

C++20 coroutine version

make cl_cpp20coro_mqtt_pub
make cl_cpp20coro_mqtt_sub
cd example

Run subscriber

./cl_cpp20coro_mqtt_sub mqtt.redboltz.net 1883

Run publisher

At another terminal, run publisher.

./cl_cpp20coro_mqtt_pub mqtt.redboltz.net 1883

Then, you can see the published messages to delivered to the subscriber.

C++17 callback version

make cl_cpp17_mqtt_pub
make cl_cpp17_mqtt_sub
cd example

Run subscriber

./cl_cpp17_mqtt_sub mqtt.redboltz.net 1883

Run publisher

At another terminal, run publisher.

./cl_cpp17_mqtt_pub mqtt.redboltz.net 1883

Then, you can see the published messages to delivered to the subscriber.