当前位置:网站首页>Redis in NoSQL database (4): redis publishing and subscription
Redis in NoSQL database (4): redis publishing and subscription
2022-06-29 07:06:00 【Tina-Deng】
Catalog
What is publish and subscribe
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、 Clients can subscribe to channels , Here's the picture :
2、 When you post a message to this channel , The message is sent to the subscribing client 
Publish and subscribe command line implementation
1、 Open a client subscription channel1
SUBSCRIBE channel1

2、 Open another client , to channel1 Release the news hello
publish channel1 hello

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
边栏推荐
- QT qlineedit details
- [when OSPF introduces direct connection routes, it makes a summary by using static black hole routes]
- VerilogA——动态比较器
- json tobean
- Move disassembly of exclusive delivery of script (the first time)
- WDCP accesses all paths that do not exist and jumps to the home page without returning 404
- 多模态 —— Learnable pooling with Context Gating for video classification
- 开源二三事|ShardingSphere 与 Database Mesh 之间不得不说的那些事
- [translation] [Chapter 2 ②] mindshare PCI Express technology 3.0
- 国内代码托管中心- 码云
猜你喜欢
![[answer all questions] CSDN question and answer function evaluation](/img/32/571c9c5f4eb7f69173ae79b8dcf427.jpg)
[answer all questions] CSDN question and answer function evaluation

Qt 程序打包发布-windeployqt工具

QT serial port programming

Redistemplate handles hash integer type problem resolution

数据库-同义词

Open source 23 things shardingsphere and database mesh have to say

Testing grpc service with grpcui

Print Yanghui triangle

Li Kou today's question -324 Swing sort II

It is the only one in China that Alibaba cloud container service has entered the Forrester leader quadrant
随机推荐
Qt 处理图像数据的类区别(QPixmap、QImage、QPicture)
Json对象和Json字符串的区别
WDCP访问不存在的路径全部跳转到首页不返回404的解决办法
Qt QFrame详解
Print Yanghui triangle
消息队列之通过幂等设计和原子锁避免重复退款
Analytic hierarchy process
用机器人教育创造新一代生产和服务工具
try anbox (by quqi99)
Idea use
Introduction to QT qfileinfo
The annual technology inventory of cloud primitives was released, and it was the right time to ride the wind and waves
多模态 —— Learnable pooling with Context Gating for video classification
Qt foreach关键字
Ribbon 服务调用与负载均衡
Instanceklass "suggestions collection" of hotspot class model
In vscade, how to use eslint to lint and format
Common status codes for page error reporting
NoSQL数据库之Redis(一):安装 & 简介
解析学习幼儿机器人教育的浪潮