3 再启动一个redis-cli用来发布两条消息 redis> publish
news.share "share a linkhttp://www.google.com" (integer) 2 redis> publish
news.blog "I post ablog" (integer) 2
4.查看两个订阅client的输出 此时java
client打印如下内容 *3 $7 message $10 news.share $34 share a link http://www.google.com -------------------------------------- *3 $7 message $9 news.blog $13 I post a blog -------------------------------------- 另一个redis-cli输出如下 1. "pmessage" 2. "news.*" 3. "news.share" 4. "share a link http://www.google.com"
1. "pmessage" 2. "news.*" 3. "news.blog" 4. "I post a blog"