mosquitto_sub
A simple MQTT version 3.1.1 client that will subscribe to topics and print the messages that it receives. More information: https://mosquitto.org/man/mosquitto_sub-1.html.
- Subscribe to the topic
sensors/temperatureinformation with Quality of Service (QoS) set to 1. (The default hostname islocalhostand port 1883):
mosquitto_sub
- Subscribe to all broker status messages publishing on
iot.eclipse.orgport 1885 and print published messages verbosely:
mosquitto_sub "iot.eclipse.org" 1885
- Subscribe to multiple topics matching a given pattern. (+ takes any metric name):
mosquitto_sub
来源:tldr-pages contributors · 作者与贡献记录 · CC BY 4.0。离线整理了版式、链接和媒体显示。
