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"