本文共 368 字,大约阅读时间需要 1 分钟。
发布消息
用法:
PUBLISH channel message 例子: PUBLISH channel1 mes1
订阅消息,可以订阅多个通道
用法:
SUBSCRIBE channel [channel …] 例子: SUBSCRIBE channel1 channel3
通配符匹配订阅
PSUBSCRIBE pattern [pattern …]
例子: PSUBSCRIBE c*1 c*5
说明:
h?llo subscribes to hello, hallo and hxllo h*llo subscribes to hllo and heeeello h[ae]llo subscribes to hello and hallo, but not hillo
转载地址:http://wuawb.baihongyu.com/