当前位置:网站首页>Redis publish subscription
Redis publish subscription
2022-07-21 22:49:00 【weixin_ forty-six million six hundred and eighty-five thousand 】
One :Redis Publish subscribe
When new news passes PUBLISH Command to channel channel1 when , This message will be sent to the three clients who subscribe to it :
1. The following example demonstrates how a publish subscription works . In our example, we created a subscription channel named redisChat:
2. Now? , Let's turn on a new one redis client , And then on the same channel redisChat Two news releases , Subscribers can receive messages
Subscriber receives message
Two . Publish subscription order
Serial number | Command and description |
1 | PSUBSCRIBE pattern [pattern ...] Subscribe to one or more channels that match the given pattern . |
2 | PUBSUB subcommand [argument [argument ...]] View subscription and publishing system status . |
3 | PUBLISH channel message Send the message to the specified channel . |
4 | PUNSUBSCRIBE [pattern [pattern ...]] Unsubscribe all channels in the given mode . |
5 | SUBSCRIBE channel [channel ...] Subscribe to information for a given channel or channels . |
6 | UNSUBSCRIBE [channel [channel ...]] To unsubscribe from a given channel . |
边栏推荐
猜你喜欢
随机推荐
543. Diameter of binary tree
二叉树之平衡树的c#实现
关于Hololens2上AssetBundle资源管理、热更新问题(个人Hololens2进阶开发小总结三)
QT初学者
2020 popularization group summary
STL preliminary understanding
Expression evaluation
【oops-framework】音频管理
2022acm summer training weekly report (I)
2022acm summer training weekly report (III)
VMware虚拟机网络模式之NAT模式
organize a team
第五周ACM训练报告
Redis主从复制的配置原理和过程
第十周ACM训练报告
D3D函数说明
567. Arrangement of strings
Redis哨兵机制及配置过程
Unity 使用 bvh 驱动骨骼动作
MySQL安装