Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Redis command to list all subscribers subscribed to redis channel

Below command only gives channel list .

127.0.0.1:6379> PUBSUB CHANNELS
1) "mychannel"
2) "mychanne2"

How to LIST subscribers subscribed on channel1 OR channel2 .?

also

i din't found redis command to list all subscribers Of a particular channel

like image 552
Mr punch Avatar asked Feb 11 '16 17:02

Mr punch


People also ask

How can I see my redis subscribers?

You can use PUBSUB NUMSUB channel1 OR PUBSUB NUMSUB channel2 and get reply about the number of subscribers for the specified channel.

How many subscribers can redis have?

Regarding the number of subscribers and publishers, it is limited by the maxclients setting, 10,000 by default. There is no limitation for subscribers and publishers, but the maximum clients (connections) limit applies.

What is subscribe in redis?

Redis and PHP Redis Pub/Sub implements the messaging system where the senders (in redis terminology called publishers) sends the messages while the receivers (subscribers) receive them. The link by which the messages are transferred is called channel. In Redis, a client can subscribe any number of channels.

How do I use redis commands?

To start Redis client, open the terminal and type the command redis-cli. This will connect to your local server and now you can run any command. In the above example, we connect to Redis server running on the local machine and execute a command PING, that checks whether the server is running or not.


1 Answers

You can use PUBSUB NUMSUB channel1 OR PUBSUB NUMSUB channel2 and get reply about the number of subscribers for the specified channel.

like image 65
Jeffrey Hill Avatar answered Sep 18 '22 08:09

Jeffrey Hill