Getting the count of all clients connected to phoenix channels

I need to get the count of all the clients connected to all topics in phoenix channels. I know I can use Presence.list to get the count of all the clients connected to a single topic, but then I’d also need to have the list of topics.

Is there any way to get this data?



I haven’t t really used socket and presence thoroughly, but until someone with more experience answers could you not just save the state of each in separate process since you know you can get the list of all clients for a single topic.
I’m just throwing this idea for you.

1 Like

Yeah I’ve not seen a way to query that information in a pubsub (though I’ve not really checked), I’d probably have a controlling process per topic that registers to a registration presence or have each register its own topic to the registration presence as well, though I’ve not made such a thing so unsure if that is a good design or not… ^.^