SUNSUBSCRIBE

SUNSUBSCRIBE [shardchannel [shardchannel ...]]
Available since:
Redis Open Source 7.0.0
Time complexity:
O(N) where N is the number of shard channels 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 shard channels, the client unsubscribes from all previously subscribed shard channels. The client receives one message for each shard channel it unsubscribes from.

Note: global channels and shard channels need to be unsubscribed from separately.

For more information about sharded Pub/Sub, see Sharded Pub/Sub.

Optional arguments

shardchannel [shardchannel ...]

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

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 shard channel, one message with the first element being the string sunsubscribe is pushed as a confirmation that the command succeeded.
RATE THIS PAGE
Back to top ↑