Skip to the content.

Home / cs-notes / Architecture / Components / Database / Redis / Message Queue / Publish & Subscribe

1 PUBSUB subcommand [argument [argument …]] 查看订阅与发布系统状态。

2 PUBLISH channel message 将信息发送到指定的频道。

3 PSUBSCRIBE pattern [pattern …] 订阅一个或多个符合给定模式的频道。

4 PUNSUBSCRIBE [pattern [pattern …]] 退订所有给定模式的频道。

5 SUBSCRIBE channel [channel …] 订阅给定的一个或多个频道的信息。

6 UNSUBSCRIBE [channel [channel …]] 指退订给定的频道。