diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2020-03-21 10:28:17 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2021-02-07 11:16:53 +0000 |
commit | 06cba6ccd165ca8b224797e37fccb9e63f026d77 (patch) | |
tree | e82f1bc439997ae296f2e74f8a64d84c5d95f140 /iredis/data/commands/pubsub.md | |
parent | Initial commit. (diff) | |
download | iredis-06cba6ccd165ca8b224797e37fccb9e63f026d77.tar.xz iredis-06cba6ccd165ca8b224797e37fccb9e63f026d77.zip |
Adding upstream version 1.9.1.upstream/1.9.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'iredis/data/commands/pubsub.md')
-rw-r--r-- | iredis/data/commands/pubsub.md | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/iredis/data/commands/pubsub.md b/iredis/data/commands/pubsub.md new file mode 100644 index 0000000..0a8c0a2 --- /dev/null +++ b/iredis/data/commands/pubsub.md @@ -0,0 +1,44 @@ +The PUBSUB command is an introspection command that allows to inspect the state +of the Pub/Sub subsystem. It is composed of subcommands that are documented +separately. The general form is: + + PUBSUB <subcommand> ... args ... + +# PUBSUB CHANNELS [pattern] + +Lists the currently _active channels_. An active channel is a Pub/Sub channel +with one or more subscribers (not including clients subscribed to patterns). + +If no `pattern` is specified, all the channels are listed, otherwise if pattern +is specified only channels matching the specified glob-style pattern are listed. + +@return + +@array-reply: a list of active channels, optionally matching the specified +pattern. + +# `PUBSUB NUMSUB [channel-1 ... channel-N]` + +Returns the number of subscribers (not counting clients subscribed to patterns) +for the specified channels. + +@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 channels +specified in the command call. + +Note that it is valid to call this command without channels. In this case it +will just return an empty list. + +# `PUBSUB NUMPAT` + +Returns the number of subscriptions to patterns (that are performed using the +`PSUBSCRIBE` command). Note that this is not just the count of clients +subscribed to patterns but the total number of patterns all the clients are +subscribed to. + +@return + +@integer-reply: the number of patterns all the clients are subscribed to. |