PUBLISH

发布消息

用法:
PUBLISH channel message


例子:
PUBLISH channel1 mes1

SUBSCRIBE

订阅消息,可以订阅多个通道

用法:
SUBSCRIBE channel [channel …]


例子:
SUBSCRIBE channel1 channel3

PSUBSCRIBE

通配符匹配订阅

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