取消订阅

Syntax
SUNSUBSCRIBE [shardchannel [shardchannel ...]]
Available since:
7.0.0
Time complexity:
O(N) where N is the number of shard channels to unsubscribe.
ACL categories:
@pubsub, @slow,

从给定的分片通道取消订阅客户端,如果未提供任何通道,则从所有通道取消订阅。

当没有指定分片通道时,客户端将从所有先前订阅的分片通道中取消订阅。 在这种情况下,将为每个取消订阅的分片通道向客户端发送一条消息。

注意:全局通道和分片通道需要分别取消订阅。

有关分片发布/订阅的更多信息,请参阅Sharded Pub/Sub

RESP2/RESP3 回复

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 ↑