发布消息
SUBSCRIBE用法:
PUBLISH channel message
例子:
PUBLISH channel1 mes1
订阅消息,可以订阅多个通道
PSUBSCRIBE用法:
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