当前位置:网站首页>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
边栏推荐
猜你喜欢

Resnet&API

已解决(pymysqL连接数据库报错)pymysqL.err.ProgrammingError: (1146,“Table ‘test.students‘ doesn‘t exist“)

以后面试官问你 为啥不建议使用Select *,请你大声回答他!

【蓝桥杯选拔赛真题46】Scratch磁铁游戏 少儿编程scratch蓝桥杯选拔赛真题讲解

Shang Silicon Valley-JVM-Memory and Garbage Collection (P1~P203)

动作捕捉系统用于柔性机械臂的末端定位控制

技能大赛训练题:MS15_034漏洞验证与安全加固

MySQL has played to such a degree, no wonder the big manufacturers are rushing to ask for it!

Redis与分布式:主从复制

The Selenium IDE of the Selenium test automation
随机推荐
MySQL [subquery]
Use of el-tooltip
DELL SC compellent 康贝存储系统怎么抓取配置信息
Combination series - there are combinations when there are arrangements
Detailed guide to compare two tables using natural full join in SQL
Asynchronous processing business using CompletableFuture
Shang Silicon Valley-JVM-Memory and Garbage Collection (P1~P203)
Resnet&API
Miller_Rabin 米勒拉宾概率筛【模板】
How to grab configuration information for DELL SC compellent storage system
hyperf的启动源码分析(二)——请求如何到达控制器
The pre-sale of the new Hyundai Paristi is open, and safety and comfort are not lost
MySql总结
OAuth2:搭建授权服务器
The 232-layer 3D flash memory chip is here: the single-chip capacity is 2TB, and the transmission speed is increased by 50%
OpenShift 4 - 定制 RHACS 安全策略,阻断生产集群使用高风险 Registry
element-plus虚拟表格virtual-list组件中是怎么实现清理lodash.memoize缓存的?
【redis】发布和订阅消息
Buffer 与 拥塞控制
Shell project combat 1. System performance analysis