Is it possible to find out how many customers have signed up the "channel" in redis?

I did not find any commands to find out how many clients are subscribed to the channel (subscribe) in redis ... Does anyone know?

Thanks,

+6
redis
source share
1 answer

Publish

Return value Integer response: number of clients who received the message.

Thus, when you publish to your channel, they tell you how many users are connected.


You can also track this yourself, using incr to increase the counter when someone subscribes to this channel and decr to unsubscribe from this channel. Thus, you can always find out how many users are connected to this channel.

+6
source share

All Articles