标签:font 消息发布 名称 服务 服务端 col 客户端 publish read
订阅端: Subscribe 频道名称
发布端: publish 频道名称 发布内容
实例:
服务端:
127.0.0.1:6379> publish zbbiex ‘hello word‘ (integer) 0 127.0.0.1:6379> publish zbbiex ‘hello word‘ (integer) 2
客户端1:
127.0.0.1:6379> subscribe zbbiex Reading messages... (press Ctrl-C to quit) 1) "subscribe" 2) "zbbiex" 3) (integer) 1 1) "message" 2) "zbbiex" 3) "hello word"
客户端2:
127.0.0.1:6379> subscribe zbbiex Reading messages... (press Ctrl-C to quit) 1) "subscribe" 2) "zbbiex" 3) (integer) 1 1) "message" 2) "zbbiex" 3) "hello word"
标签:font 消息发布 名称 服务 服务端 col 客户端 publish read
原文地址:https://www.cnblogs.com/zbbiex/p/10540475.html