1
向特定頻道發佈消息。如何在Redis中使用UNSUBSCRIBE命令2.6.11
redis 127.0.0.1:6379> PUBLISH channel message
(integer) 0
使用另一個Redis客戶端我訂閱了頻道。
redis 127.0.0.1:6379> SUBSCRIBE channel
Reading messages... (press Ctrl-C to quit)
1) "subscribe"
2) "channel"
3) (integer) 1
在Redis客戶端中,我獲得了所有發佈的消息。現在我想取消訂閱訂閱頻道。但我無法在Redis客戶端中輸入取消訂閱。當我使用Ctrl + c完整Redis客戶端退出時。如何在Redis客戶端中寫入Unsubscribe命令?