当前位置:网站首页>基于mysql的消息队列设计
基于mysql的消息队列设计
2022-07-31 22:37:00 【InfoQ】
消息队列设计
存储消息数据的 MySQL 表格
表名
消息表
{topic}_message
字段

原因
- 如果一个topic一张表,在实际生产中很可能每张表的负载情况不同,容易造成资源分配的不均匀和浪费。而且如果有表的消息数量增长的很快时,进行横向或纵向扩容,由于本身每个topic已经分表,会进一步增加表管理的复杂度。
- 将自增主键作为索引,有利于mysql快速查询和写入,避免性能损耗。
订阅表
subscribe_info
字段

边栏推荐
- Realization of character makeup
- Federated Learning: Multi-source Knowledge Graph Embedding in Federated Scenarios
- Flex layout in detail
- Golang must know the Go Mod command
- 高等代数_证明_任何矩阵都相似于一个上三角矩阵
- TypeScript 的组件
- Efficient Concurrency: A Detailed Explanation of Synchornized's Lock Optimization
- @JsonFormat(pattern="yyyy-MM-dd") time difference problem
- Implementing a Simple Framework for Managing Object Information Using Reflection
- 输入输出优化
猜你喜欢
IJCAI2022 | 代数和逻辑约束的混合概率推理
Implementation of a sequence table
Unity - LineRenderer show a line
ECCV 2022 Huake & ETH propose OSFormer, the first one-stage Transformer framework for camouflaging instance segmentation!The code is open source!...
Efficient Concurrency: A Detailed Explanation of Synchornized's Lock Optimization
How to identify fake reptiles?
ThreadLocal
数据分析(一)——matplotlib
focus on!Haitai Fangyuan joins the "Personal Information Protection Self-discipline Convention"
The difference between adding or not adding the ref keyword when a variable of reference type is used as a parameter in a method call in C#
随机推荐
linux view redis version command (linux view mysql version number)
SQL注入 Less46(order by后的注入+rand()布尔盲注)
SQL注入 Less42(POST型堆叠注入)
Judging decimal points and rounding of decimal operations in Golang
Unity - by casting and cloning method dynamic control under various UGUI create and display
[QNX Hypervisor 2.2 User Manual]9.14 set
The old music player WinAmp released version 5.9 RC1: migrated to VS 2019, completely rebuilt, compatible with Win11
SQL注入 Less47(报错注入) 和Less49(时间盲注)
[Open class preview]: Research and application of super-resolution technology in the field of video image quality enhancement
server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none failed
[QNX Hypervisor 2.2用户手册]9.15 suppress
输入输出优化
The article you worked so hard to write may not be your original
【Acwing】第62场周赛 题解
Go1.18 upgrade function - Fuzz test from scratch in Go language
hboot and recovery, boot.img, system.img
Binary tree non-recursive traversal
IJCAI2022 | 代数和逻辑约束的混合概率推理
Unity-LineRenderer显示一条线
spark reports an error OutOfMemory "recommended collection"