发布
Syntax
PUBLISH channel message
- Available since:
- 2.0.0
- Time complexity:
- O(N+M) where N is the number of clients subscribed to the receiving channel and M is the total number of subscribed patterns (by any client).
- ACL categories:
-
@pubsub
,@fast
,
向给定频道发布消息。
在Redis集群中,客户端可以向每个节点发布消息。集群确保发布的消息根据需要被转发,因此客户端可以通过连接到任何一个节点来订阅任何频道。