Redis SUBSCRIBE 命令将客户端订阅到指定的频道。
SUBSCRIBE channel - 语法
以下是Redis SUBSCRIBE 命令的基本语法。
redis 127.0.0.1:6379> SUBSCRIBE channel [channel ...]
SUBSCRIBE channel - 返回值
返回数组。
SUBSCRIBE 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"
参考链接
https://www.learnfk.com/redis/pub-sub-subscribe.html
标签:mychannel,0.1,Redis,redis,无涯,SUBSCRIBE,channel From: https://blog.51cto.com/u_14033984/9166086