redis - How to determine number of clients listening for broadcasting? -
i using laravel 5.1 , want know how many clients listening particular channel test-channel. want number on server? there way can it? further using broadcasting redis.
the link broadcasting document follows:
there command in redis. check out pubsub numsub:
returns number of subscribers (not counting clients subscribed patterns) specified channels.
and pubsub numpat:
returns number of subscriptions patterns (that performed using psubscribe command). note not count of clients subscribed patterns total number of patterns clients subscribed to.
edit: it's worth noting publish command returns number of receivers:
return value
integer reply: number of clients received message.
Comments
Post a Comment