summaryrefslogtreecommitdiffstats
path: root/iredis/data/commands/pubsub-shardnumsub.md
diff options
context:
space:
mode:
Diffstat (limited to 'iredis/data/commands/pubsub-shardnumsub.md')
-rw-r--r--iredis/data/commands/pubsub-shardnumsub.md19
1 files changed, 19 insertions, 0 deletions
diff --git a/iredis/data/commands/pubsub-shardnumsub.md b/iredis/data/commands/pubsub-shardnumsub.md
new file mode 100644
index 0000000..8d09d43
--- /dev/null
+++ b/iredis/data/commands/pubsub-shardnumsub.md
@@ -0,0 +1,19 @@
+Returns the number of subscribers for the specified shard channels.
+
+Note that it is valid to call this command without channels, in this case it will just return an empty list.
+
+Cluster note: in a Redis Cluster, `PUBSUB`'s replies in a cluster only report information from the node's Pub/Sub context, rather than the entire cluster.
+
+@return
+
+@array-reply: a list of channels and number of subscribers for every channel.
+
+The format is channel, count, channel, count, ..., so the list is flat. The order in which the channels are listed is the same as the order of the shard channels specified in the command call.
+
+@examples
+
+```
+> PUBSUB SHARDNUMSUB orders
+1) "orders"
+2) (integer) 1
+```