订阅
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"