开发者

Is it possible to know how many clients subscribed a "channel" in redis?

I di开发者_运维技巧dnt find any commands to know how many client subscribed a channel (subscribe) in redis... Somebody know?

Thanks,


Publish

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜