当前位置:网站首页>redis发布订阅命令行实现
redis发布订阅命令行实现
2022-07-05 06:00:00 【一个风轻云淡】
- 打开一个客户端订阅channel1
SUBSCRIBE channel1
2、打开另一个客户端,给channel1发布消息hello
publish channel1 hello
返回的1是订阅者数量
打开第一个客户端可以看到发送的消息
注:发布的消息没有持久化,如果在订阅的客户端收不到hello,只能收到订阅后发布的消息
边栏推荐
- Kubedm series-00-overview
- The sum of the unique elements of the daily question
- 对for(var i = 0;i < 5;i++) {setTimeout(() => console.log(i),1000)}的深入分析
- Maximum number of "balloons"
- Wazuh开源主机安全解决方案的简介与使用体验
- Palindrome (csp-s-2021-palin) solution
- leetcode-6109:知道秘密的人数
- Some common problems in the assessment of network engineers: WLAN, BGP, switch
- Individual game 12
- Wazuh開源主機安全解决方案的簡介與使用體驗
猜你喜欢
How to adjust bugs in general projects ----- take you through the whole process by hand
【实战技能】非技术背景经理的技术管理
[jailhouse article] look mum, no VM exits
Solution to the palindrome string (Luogu p5041 haoi2009)
Sword finger offer 53 - ii Missing numbers from 0 to n-1
Individual game 12
Brief introduction to tcp/ip protocol stack
剑指 Offer 53 - II. 0~n-1中缺失的数字
Implement a fixed capacity stack
Sword finger offer 35 Replication of complex linked list
随机推荐
ALU逻辑运算单元
剑指 Offer 05. 替换空格
Configuration and startup of kubedm series-02-kubelet
Sword finger offer 53 - ii Missing numbers from 0 to n-1
Pointnet++ learning
Kubedm series-00-overview
LeetCode 0108.将有序数组转换为二叉搜索树 - 数组中值为根,中值左右分别为左右子树
Transform optimization problems into decision-making problems
Simple knapsack, queue and stack with deque
Daily question - Search two-dimensional matrix PS two-dimensional array search
【云原生】微服务之Feign自定义配置的记录
LeetCode 0107.二叉树的层序遍历II - 另一种方法
The sum of the unique elements of the daily question
Sword finger offer 05 Replace spaces
Smart construction site "hydropower energy consumption online monitoring system"
剑指 Offer 53 - II. 0~n-1中缺失的数字
Annotation and reflection
2017 USP Try-outs C. Coprimes
Dynamic planning solution ideas and summary (30000 words)
剑指 Offer 09. 用两个栈实现队列