I have been looking for a way to know which clients are connected my broker and to which topics. I'm using esp32 as clients with PubSubClient.h library. the esp32 has to five a client name on the connection moment, and later it has to subscribe to some topic if we expect it to receive their publishes...so we should be able to see this information..correct?
I'm currently using mosquitto and if I subscribe to $SYS/broker/clients/connected, $SYS/broker/clients/total or $SYS/broker/subscriptions/count I get a payload with the current number of clients connected , total clients or subscriptions made. But never the name of the clients or the topics.
There is nothing in the MQTT protocol that defines what Brokers should do in this area. Any solution (if there is one) will be specific to the particular broker you are using - something you don't mention.
I'm guessing you're using mosquitto? I do not think it exposes the sorts of details you are looking for on any of the $SYS topics.
Thank you for the response. Yes I'm using mosquitto, and accoding to this thereisn't a $SYS for specific topics. But what about other brokers, do you know anything that comes close to what I mention?
Thank you.
Cheers, LuĂs Pereira.