当前位置:网站首页>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
边栏推荐
- Nuget package and upload tutorial
- 49. The copy constructor and overloaded 】
- Shell脚本经典案例:文件的备份
- 常用工具命令速查表
- The 232-layer 3D flash memory chip is here: the single-chip capacity is 2TB, and the transmission speed is increased by 50%
- The JVM a class loader
- [QNX Hypervisor 2.2 User Manual] 9.13 rom
- UnityShader入门学习(二)——渲染流水线
- 232层3D闪存芯片来了:单片容量2TB,传输速度提高50%
- 龟速乘【模板】
猜你喜欢

I summed up the bad MySQL interview questions

49. The copy constructor and overloaded 】

For enterprises in the digital age, data governance is difficult, but it should be done

五个维度着手MySQL的优化

1-hour live broadcast recruitment order: industry leaders share dry goods, and enterprise registration is open丨qubit · point of view

Comparison of Optical Motion Capture and UWB Positioning Technology in Multi-agent Cooperative Control Research

海康摄像机取流RTSP地址规则说明
![[Blue Bridge Cup Trial Question 46] Scratch Magnet Game Children's Programming Scratch Blue Bridge Cup Trial Question Explanation](/img/57/f23c21c7ed4b9701a3f6119bfd8493.png)
[Blue Bridge Cup Trial Question 46] Scratch Magnet Game Children's Programming Scratch Blue Bridge Cup Trial Question Explanation

技能大赛训练题:域用户和组织单元的创建

2021 OWASP TOP 10 漏洞指南
随机推荐
The recently popular domestic interface artifact Apipost experience
MySQL [aggregate function]
Description of Hikvision camera streaming RTSP address rules
动作捕捉系统用于柔性机械臂的末端定位控制
小试牛刀:Go 反射帮我把 Excel 转成 Struct
AWS实现定时任务-Lambda+EventBridge
技能大赛训练题:ftp 服务攻防与加固
[QNX Hypervisor 2.2 User Manual]9.14 safety
Small test knife: Go reflection helped me convert Excel to Struct
Use of C# Assembly
Redis与分布式:主从复制
The Selenium IDE of the Selenium test automation
An article makes it clear!What is the difference and connection between database and data warehouse?
The magic of SQL MERGE statement (detailed instructions)
232层3D闪存芯片来了:单片容量2TB,传输速度提高50%
IDEA连接MySQL数据库并使用数据
Recommendation System - Recall Phase - 2013: DSSM (Twin Towers Model) [Embedding (Semantic Vector) Recall] [Microsoft]
Shell脚本经典案例:文件的备份
【Pytorch】torch.argmax()用法
1小时直播招募令:行业大咖干货分享,企业报名开启丨量子位·视点