Redis学习-15 发布订阅

  1. subscribe channel-01 channel-02 ... #订阅一个或多个频道

  2. unsubscribe channel [channel ...] #退订一个或多个频道

  3. publish channel-01 "hello, i m here" #发布一个一个消息到一个频道

  4. pubsub channels #查看订阅与发布系统状态,它由数个不同格式的子命令组成

  5. PSUBSCRIBE pattern [pattern ...] #订阅一个或多个符合给定模式的频道。每个模式以 * 作为匹配符,比如 it* 匹配所有以 it 开头的频道( it.news 、 it.blog 、 it.tweets 等等)。 news.* 匹配所有以 news. 开头的频道( news.it 、 news.global.today 等等)

  6. PUNSUBSCRIBE [pattern [pattern ...]] #退订所有给定模式的频道

posted @ 2020-08-21 23:14  CEO雷总  阅读(93)  评论(0编辑  收藏  举报