PUBSUB SHARDNUMSUB
Syntax
PUBSUB SHARDNUMSUB [shardchannel [shardchannel ...]]
- Available since:
- 7.0.0
- Time complexity:
- O(N) for the SHARDNUMSUB subcommand, where N is the number of requested shard channels
- ACL categories:
-
@pubsub
,@slow
,
返回指定分片频道的订阅者数量。
请注意,在没有通道的情况下调用此命令是有效的,在这种情况下,它将只返回一个空列表。
集群说明:在Redis集群中,PUBSUB
的回复仅报告来自节点的Pub/Sub上下文的信息,而不是整个集群的信息。
示例
> PUBSUB SHARDNUMSUB orders
1) "orders"
2) (integer) 1