当前位置:网站首页>Message queue data storage MySQL table design
Message queue data storage MySQL table design
2022-07-31 14:26:00 【InfoQ】
1. Introduction
- Message producers can create queue topics and submit messages to custom queue topics.
- The message consumer pulls the message from the topic queue.
- The messages in the queue can be consumed only once or read by multiple consumers.
2. Message queue data table design

3. Key design
3.1 Use the same library table to store all topics
- One table per queue theme
- All queue themes are placed in the same table
3.2 Database Table Sharding
- Improve performance, store some messages in each table, and improve the speed of message reading and query.
- It is convenient for data clustering. When establishing a cluster, only some tables need to be moved to other servers.
- Convenient for data backup, you can back up updated data without re-backing up the entire table.
- It is convenient to discard old messages. Old messages that have been consumed can be deleted according to requirements, and the expired table can be deleted.
- Randomly store the message in the currently usedin the data sheet.
- Hash, calculate the hash value for the topic, and store the message in the corresponding data table according to the hash value.
3.2 Index
边栏推荐
- LeetCode只出现一次的数字
- redhat/openssl生成自签ca证书并使用
- 【Pytorch】F.softmax()方法说明
- MySQL 23 classic interviews hang the interviewer
- 技能大赛dhcp服务训练题
- Use of el-tooltip
- 线程池的使用二
- 1-hour live broadcast recruitment order: industry leaders share dry goods, and enterprise registration is open丨qubit · point of view
- 技能大赛训练题:MS15_034漏洞验证与安全加固
- OAuth2:使用JWT令牌
猜你喜欢
Analysis of the startup source code of hyperf (2) - how the request reaches the controller
Resolved (pymysqL connect to the database error) pymysqL. Err. ProgrammingError: (1146, "Table" test. Students' doesn 't exist ")
尚硅谷-JVM-内存和垃圾回收篇(P1~P203)
技能大赛训练题:登录安全加固
The 232-layer 3D flash memory chip is here: the single-chip capacity is 2TB, and the transmission speed is increased by 50%
Selenium自动化测试之Selenium IDE
Motion capture system for end-positioning control of flexible manipulators
The paper manual becomes 3D animation in seconds, the latest research of Wu Jiajun of Stanford University, selected for ECCV 2022
Node version switching management using NVM
多智能体协同控制研究中光学动作捕捉与UWB定位技术比较
随机推荐
Shell脚本经典案例:探测批量主机是否存活
拥塞控制,CDN,端到端
UnityShader入门学习(三)——Unity的Shader
ADS communicate with c #
一篇文章讲清楚!数据库和数据仓库到底有什么区别和联系?
Resnet&API
MySQL has played to such a degree, no wonder the big manufacturers are rushing to ask for it!
已解决(pymysqL连接数据库报错)pymysqL.err.ProgrammingError: (1146,“Table ‘test.students‘ doesn‘t exist“)
推荐系统-召回阶段-2013:DSSM(双塔模型)【Embedding(语义向量)召回】【微软】
The Selenium IDE of the Selenium test automation
csdn发文助手问题
49. The copy constructor and overloaded 】
【Pytorch】torch.argmax()用法
常用工具命令速查表
Five dimensions to start MySQL optimization
Miller_Rabin Miller Rabin probability sieve [template]
Shell项目实战1.系统性能分析
UnityShader入门学习(一)——GPU与Shader
LeetCode·每日一题·1161.最大层内元素和·层次遍历
技能大赛训练题: 子网掩码划分案例