mosquitto_sub命令 ################# mosquitto_sub命令:: // Local Subscription mosquitto_sub -t '$local/topic' // Shared Subscription mosquitto_sub -t ‘$queue/topic’ mosquitto_sub -t ‘$share/group/topic’ // -t --topic: 指定topic // -m --message: 消息内容 // -q --qos: 指定QoS的值(0,1,2) // -r --retain: 保持 mosquitto_sub -t topic -m msg -q 1 -r // -p --port: 端口,默认1883 // -d --debug: 调试模式 // -h --host: 默认localhost mosquitto_sub -t sensor/# -h 10.140.2.6 -p 2883 -d 实例-双向认证:: $ mosquitto_sub -h 10.30.11.47 -p 8883 -t "mqtt/topic" --cafile ./ca/ca.crt --cert ./client.crt --key ./client.key 实例-单向认证:: $ mosquitto_sub -h 10.30.11.47 -p 8884 -t "mqtt/topic" --cafile ./ca/ca.crt &