Redis 发布Pub/订阅Sub

常用命令:

publish channel message        //将信息发送到指定的频道
SUBSCRIBE channel [channel ...]     //订阅给定的一个或多个频道的信息。
psubscribe pattern [pattern ...]      //订阅一个或多个符合给定模式的频道。
unsubscribe [channel [channel ...]]     //指示客户端退订给定的频道。
punsubscribe [pattern [pattern ...]]           //指示客户端退订所有给定模式。

猜你喜欢

转载自www.cnblogs.com/flycc/p/12672904.html