SUBSCRIBE channel [channel ...]
Redis Subscribe 命令用于订阅给定的一个或多个频道的信息。。
语法
redis Subscribe 命令基本语法如下:
redis 127.0.0.1:6379> SUBSCRIBE channel [channel ...]内容由w▆▇█3▆▇█x▆▇█u▆▇█e.com提-供,请勿盗用!
可用版本
>= 2.0.0
返回值
接收到的信息
实例
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"内容由w▆▇█3▆▇█x▆▇█u▆▇█e.com提-供,请勿盗用!