-
subscribe channel-01 channel-02 ... #订阅一个或多个频道
-
unsubscribe channel [channel ...] #退订一个或多个频道
-
publish channel-01 "hello, i m here" #发布一个一个消息到一个频道
-
pubsub channels #查看订阅与发布系统状态,它由数个不同格式的子命令组成
-
PSUBSCRIBE pattern [pattern ...] #订阅一个或多个符合给定模式的频道。每个模式以 * 作为匹配符,比如 it* 匹配所有以 it 开头的频道( it.news 、 it.blog 、 it.tweets 等等)。 news.* 匹配所有以 news. 开头的频道( news.it 、 news.global.today 等等)
-
PUNSUBSCRIBE [pattern [pattern ...]] #退订所有给定模式的频道