当前位置:网站首页>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
边栏推荐
- Li Kou daily question - day 30 -1523 Number of bit 1
- Json tobean
- [translation] [Chapter 2 ②] mindshare PCI Express technology 3.0
- Introduction to QT qfileinfo
- [translation] [Chapter 2 ③] mindshare PCI Express technology 3.0
- 更改主机名的方法(永久)
- Multimodal learning pooling with context gating for video classification
- WDCP访问不存在的路径全部跳转到首页不返回404的解决办法
- try anbox (by quqi99)
- UVM验证平台
猜你喜欢

Redistemplate handles hash integer type problem resolution

Suggestions on digital transformation of large chemical enterprises

Print Yanghui triangle

The meaning and calculation method of receptive field

mongostat性能分析

JDBC connects to the database and socket sends the client.

QT qlineedit details

Crawler data analysis (introduction 2-re analysis)

作为一名合格的网工,你必须掌握的 DHCP Snooping 知识!

RPC和RMI
随机推荐
Daily question - force deduction - multiply the found value by 2
Error: GPG check FAILED Once install MySQL
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
. NETCORE uses redis to limit the number of interface accesses
Qt foreach关键字
NoSQL数据库之Redis(四):Redis新数据类型
Some high-level usage of localstorage
Presto-Trial
Linux Installation redis
Redistemplate handles hash integer type problem resolution
Multimodal learning pooling with context gating for video classification
Method of changing host name (permanent)
try anbox (by quqi99)
Effective methods for construction enterprises to select smart construction sites
Better than postman! Apipost knows more about Chinese programmers! How delicious!
QT container class
json tobean
Annual inventory review of Alibaba cloud's observable practices in 2021
Labor skills courses integrated into steam Education