Redis SUBSCRIBE命令所預訂客戶的指定的通道。
Redis SUBSCRIBE命令基本語法如下所示:
redis 127.0.0.1:6379> SUBSCRIBE channel [channel ...]
返回陣列
redis 127.0.0.1:6379> SUBSCRIBE mychannel Reading messages... (press Ctrl-C to quit) 1) "subscribe" 2) "mychannel" 3) (integer) 1 1) "message" 2) "mychannel" 3) "a"