Redis-pub-sub-unsubscribe

提供:Dev Guides
移動先:案内検索

Redis-PubSub購読解除コマンド

Redis UNSUBSCRIBE コマンドは、指定されたチャネル、または何も指定されていない場合はすべてのチャネルからクライアントをサブスクライブ解除します。

構文

以下は、Redis UNSUBSCRIBE コマンドの基本的な構文です。

redis 127.0.0.1:6379> UNSUBSCRIBE channel [channel ...]

戻り値

配列応答。

redis 127.0.0.1:6379> UNSUBSCRIBE mychannel
1) "unsubscribe"
2) "a"
3) (integer) 0