Redis 消息订阅

订阅

192.168.2.120:6379> SUBSCRIBE channel            

Reading messages... (press Ctrl-C to quit)

1) "subscribe"

2) "channel"

3) (integer) 1

 

发送信息:

192.168.2.120:6379> PUBLISH channel rscpass

(integer) 1

 

 

接收到信息

192.168.2.120:6379> SUBSCRIBE channel

Reading messages... (press Ctrl-C to quit)

1) "subscribe"

2) "channel"

3) (integer) 1

1) "message"

2) "channel"

3) "rscpass"

 

 

 

分割线
感谢打赏
江西数库信息技术有限公司
YWSOS.COM 平台代运维解决方案
 评论
 发表评论
姓   名:

Powered by AKCMS