SUBSCRIBE 订阅模式
127.0.0.1:6379> SUBSCRIBE runoobChar
Reading messages... (press Ctrl-C to quit)
1) "subscribe"
2) "runoobChar"
3) (integer) 1
1) "message"
2) "runoobChar"
3) "Redis PUBLISH test"
1) "message"
PUBLISH 发布模式
127.0.0.1:6379> PUBlish runoobChar 'hello'
(integer) 1
网友评论