MQTT support in curl is considered EXPERIMENTAL until further notice. It needs to be enabled at build-time. See below.
After the initial merge, further development and tweaking of the MQTT support in curl will happen in the master branch using pull-requests, just like ordinary changes.
Experimental support for MQTT means that we do not guarantee that the current protocol functionality will remain or remain this way going forward. There are no API or ABI promises for experimental features as for regular curl features.
Do not ship anything with this enabled.
A plain “GET” subscribes to the topic and prints all published messages. Doing a “POST” publishes the post data to the topic and exits.
curl -d 80 mqtt://host/home/bedroom/dimmer
It outputs two bytes topic length (MSB | LSB), the topic followed by the payload.
The initial MQTT patch was authored by Björn Stenberg. This work is built upon that patch and has been expanded since.