brew install mosquitto
默认配置文件
/usr/local/etc/mosquitto/mosquitto.conf
通过开机自启
brew services restart mosquitto
或者通过手动启动
/usr/local/opt/mosquitto/sbin/mosquitto -c /usr/local/etc/mosquitto/mosquitto.conf
发布消息
mosquitto_pub -t topic -m message -q 1
订阅消息
mosquitto_sub -t topic -c -i id -q 1
本文由 Nio 创作,采用 知识共享署名4.0 国际许可协议进行许可
本站文章除注明转载/出处外,均为本站原创或翻译,转载前请务必署名
最后编辑时间为:
2021/11/11 15:10