clients management #742
-
Hi, I would like to build a broker clients management tool. My targets are:
I know that Ades object has "clients" property with every clients info. But in a Redis cluster scenario, this "clients" property is related only to that broker instance, isn't it? Is there a way to get every cluster clients info? Maybe from Redis? thanks |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
You could build a generic one by just using aedes-persistence methods. For example in order to get all subscriptions you could call subscriptionsByTopic method with In order to force a client disconnection you should use the subscription client id to get the client instance from aedes broker and call the Let me know if you build it we could add it to moscajs org if it is an OSS project :) |
Beta Was this translation helpful? Give feedback.
-
Thank you Daniel for your hints. Each broker of the cluster is subscribed to "$SYS/clients/list" and "$SYS/clients/disconnect" topics. ClientManager is an mqtt client with special auth that let it pub/sub on $SYS topics. |
Beta Was this translation helpful? Give feedback.
You could build a generic one by just using aedes-persistence methods. For example in order to get all subscriptions you could call subscriptionsByTopic method with
'#'
.In order to force a client disconnection you should use the subscription client id to get the client instance from aedes broker and call the
close
method.Let me know if you build it we could add it to moscajs org if it is an OSS project :)