libpaho-mqtt

C client library for connecting to MQTT message brokers

brewmacoslinux
Try with needOr install directly
Source

About

Eclipse Paho C client library for MQTT

Examples

publish a message to an mqtt broker$ mosquitto_pub -h broker.mqtt.cool -t test/topic -m 'Hello MQTT'
subscribe to messages from an mqtt topic$ mosquitto_sub -h broker.mqtt.cool -t test/topic
write c code that connects to mqtt broker$ gcc -o mqtt_client client.c -lpaho-mqtt3c
send mqtt message with username and password authentication$ mosquitto_pub -h broker.mqtt.cool -u user -P pass -t sensor/temp -m '25.5'
check installed mqtt library version and location$ pkg-config --modversion libpaho-mqtt && pkg-config --cflags --libs libpaho-mqtt