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"