Skip to main content

PUBSUB NUMPAT

Syntax

PUBSUB NUMPAT 

Time complexity: O(1)

ACL categories: @pubsub, @slow

Returns the number of unique patterns that are subscribed to by clients (that are performed using the PSUBSCRIBE command).

Note that this isn't the count of clients subscribed to patterns, but the total number of unique patterns all the clients are subscribed to.

Return

Integer reply: the number of patterns all the clients are subscribed to.