Reputation: 199
I didnt find any commands to know how many client subscribed a channel (subscribe) in redis... Somebody know?
Thanks,
Upvotes: 6
Views: 602
Reputation: 61771
Return value
Integer reply: the number of clients that received the message.
That way when you publish to your channel, you be informed how many users are connected.
You could also keep track of this yourself using incr to increment counter when somebody subscribes to that channel and decr on unsubscribe to that channel. That way you can always know how many users are connected to that channel.
Upvotes: 6