Subscribing to $SYS/#
topic will provide some information about the broker and maybe about the clients. Detailed description of these items can be found here.
There are three main categories to highlight:
- Static Topics: Messages on a static
$SYS
topic are not required to be sent on every $SYS
topic update interval. These messages are
sent once the broker subscribes to the $SYS topic
- Required Topics: Every broker which claims to support the
$SYS
topics should support these topics.
- Optional Topics: A broker implementation may decide if it implements an optional topic.
The one needed to for client status check falls into the "Optional Topics" category.
Also, based on this description about Mosquitto's logging, the console log can be logged into a topic ($SYS/broker/log/#
) as well.
Two common question are:
- Can I see all connected clients?
- Can I list all topics?
The broker doesn’t let you do this directly but by enabling logging to
a a topic and monitoring the topic with an MQTT client you can get a
good idea.
Probably for privacy and/or security reasons iot.eclipse.org does not have topics for these log entries.
For other public brokers these optional topics may exist, you can check them easily with mqtt-spy for example.