当前位置:网站首页>Redis publish and subscribe
Redis publish and subscribe
2022-07-04 14:54:00 【BugMaker-shen】
Redis Publish subscribe (pub/sub) It's a message communication mode : sender (pub) Send a message , subscriber (sub) receive messages
Redis Clients can subscribe to any number of channels
Redis Publish and subscribe to
(1) The client can subscribe to channels, as shown in the figure below
(2) When you post a message to this channel , The message is sent to the subscribing client
Publish subscribe command line practice
(1) Open a client subscription channel1
SUBSCRIBE channel1
(2) Open another client , to channel1 Release the news hello
publish channel1 hello
notes : Back to 1 Is the number of subscribers
(3) Open the first client to see the sent message
notes : Published messages are not persistent , If the subscription client does not receive hello, Only messages published after subscription can be received
边栏推荐
- Luo Gu - some interesting questions
- [MySQL from introduction to proficiency] [advanced chapter] (IV) MySQL permission management and control
- Openresty redirection
- 程序员自曝接私活:10个月时间接了30多个单子,纯收入40万
- Opencv learning notes - linear filtering: box filtering, mean filtering, Gaussian filtering
- Guitar Pro 8win10最新版吉他学习 / 打谱 / 创作
- ES6 modularization
- 关于miui12.5 红米k20pro用au或者povo2出现问题的解决办法
- Exploration and practice of eventbridge in the field of SaaS enterprise integration
- Luo Gu - some interesting questions 2
猜你喜欢
An overview of 2D human posture estimation
Is BigDecimal safe to calculate the amount? Look at these five pits~~
Digi XBee 3 rf: 4 protocols, 3 packages, 10 major functions
Docker compose public network deployment redis sentinel mode
Summary of common problems in development
Details of FPGA underlying resources
Transplant tinyplay for imx6q development board QT system
Ffprobe common commands
flink sql-client. SH tutorial
为什么国产手机用户换下一部手机时,都选择了iPhone?
随机推荐
Ffmpeg Visual Studio development (IV): audio decoding
(1) The standard of performance tuning and the correct posture for tuning - if you have performance problems, go to the heapdump performance community!
flink sql-client. SH tutorial
Detailed explanation of visual studio debugging methods
LVGL 8.2 LED
Xcode abnormal pictures cause IPA packet size problems
LeetCode 1200 最小绝对差[排序] HERODING的LeetCode之路
Docker compose public network deployment redis sentinel mode
Chapter 16 string localization and message Dictionary (2)
各大主流编程语言性能PK,结果出乎意料
Digi XBee 3 RF: 4个协议,3种封装,10个大功能
炒股网上开户安全吗?会不会被骗。
Industrial Internet has greater development potential and more industry scenarios
Detailed analysis of pytorch's automatic derivation mechanism, pytorch's core magic
LVGL 8.2 text shadow
Korean AI team plagiarizes shock academia! One tutor with 51 students, or plagiarism recidivist
LVGL 8.2 text shadow
5G电视难成竞争优势,视频资源成中国广电最后武器
毕业季-个人总结
PLC模拟量输入 模拟量转换FC S_ITR (CODESYS平台)