Tekkaman

导航

 

Redis 发布/定阅

1、SUBSCRIBE channel [channel ...]

订阅给定的一个或多个频道的信息。

2、PSUBSCRIBE pattern [pattern ...]

订阅一个或多个符合给定模式的频道。

每个模式以 * 作为匹配符,比如 it* 匹配所有以 it 开头的频道( it.news 、 it.blog 、 it.tweets 等等), news.* 匹配所有以 news. 开头的频道( news.it 、 news.global.today 等等),诸如此类。

3、PUBLISH channel message

将信息 message 发送到指定的频道 channel 。

4、PUBSUB子命令。

参考:http://redisdoc.com/pub_sub/pubsub.html

posted on 2015-10-19 20:01  Tekkaman  阅读(272)  评论(0编辑  收藏  举报