一、是什么
进程间的一种消息通信模式:发送者(pub)发送消息,订阅者(sub)接收消息。
二、操作
先订阅后发布 后才能收到消息,
1 可以一次性订阅多个,SUBSCRIBE c1 c2 c3
2 消息发布,PUBLISH c2 hello-redis
3 订阅多个,通配符*, PSUBSCRIBE new*
4 收取消息, PUBLISH new1 redis2015

一、是什么
进程间的一种消息通信模式:发送者(pub)发送消息,订阅者(sub)接收消息。
二、操作
先订阅后发布 后才能收到消息,
1 可以一次性订阅多个,SUBSCRIBE c1 c2 c3
2 消息发布,PUBLISH c2 hello-redis
3 订阅多个,通配符*, PSUBSCRIBE new*
4 收取消息, PUBLISH new1 redis2015
上一篇 Codeforces Round #767 (Div. 2) A-D和F1
下一篇 端口占用Identify and stop the process that‘s listening on port 8080 or configure thi