当前位置 博文首页 > Redis发布/订阅_cuk0051的博客:redis发布/订阅广播
redis发布/订阅广播
Redis implements a publish/subscribe messaging mechanism.
Redis实现了发布/订阅消息传递机制。
Its concept is simple: a publisher sends a message on a channel. Multiple subscribers receive it.
它的概念很简单:发布者在频道上发送消息。 多个订户收到它。
Subscribe to a channel using
订阅频道使用
SUBSCRIBE <channel>
Publish to a channel using
使用发布到频道
PUBLISH <channel> <message>
Example:
例:
SUBSCRIBE dogs
cs