PUNSUBSCRIBE

PUNSUBSCRIBE [pattern [pattern ...]]
Available since:
Redis Open Source 2.0.0
Time complexity:
O(N) where N is the number of patterns to unsubscribe.
ACL categories:
@pubsub, @slow,
Compatibility:
Redis Software and Redis Cloud compatibility

Unsubscribes the client from the specified patterns, or from all patterns if none are specified.

If you don’t specify any patterns, the client unsubscribes from all previously subscribed patterns. The client receives one message for each pattern it unsubscribes from.

Optional arguments

pattern [pattern ...]

One or more patterns to unsubscribe from. If omitted, the client is unsubscribed from all patterns.

Redis Software and Redis Cloud compatibility

Redis
Software
Redis
Cloud
Notes
✅ Standard
✅ Active-Active
✅ Standard
✅ Active-Active

Return information

When successful, this command doesn't return anything. Instead, for each pattern, one message with the first element being the string punsubscribe is pushed as a confirmation that the command succeeded.
RATE THIS PAGE
Back to top ↑