当前位置:网站首页>Message Queuing Message Storage Design (Architecture Camp Module 8 Jobs)
Message Queuing Message Storage Design (Architecture Camp Module 8 Jobs)
2022-08-01 03:39:00 【InfoQ】
Message table

Consume information table
consume_log table
- We support multiple consumer groups, each consumer group shares a consumption progress record, so the table needs to have a group field to distinguish which consumer isThe consumption record of the group;
- The consumption offset is the most important, which records the consumption data, which is identified by offset, that is, messageThe msg_id in the table, because msg_id is strictly increasing under one data group and one topic;
Index Analysis
Send messages
- CustomersThe end completes the shard routing, assigns it to a shard, and sends the message data
- The message queue server finds the corresponding message table according to the topic message_{topic}, and then insert data, msg_id auto-increment
Consume message
- The client completes the routing of the fragmentation and sends thePull the message from the corresponding server, bring the parameters topic, group
- to query the consumer_log table, find the corresponding data through the index according to topic, group, and take out the offset
- Query the corresponding message table according to the offset, find the next offset record through the primary key id, take it out and prepare to return
- Update the offset information of consumer_log
- return data
边栏推荐
- Character encoding and floating point calculation precision loss problem
- ARM cross compilation
- MySQL3
- The IDEA can't find or unable to load The main class or Module "*" must not contain The source root "*" The root already belongs to The Module "*"
- 情人节浪漫3D照片墙【附源码】
- 剑指offer专项突击版第16天
- MYSQL-Batch insert data
- The maximum quantity leetcode6133. Grouping (medium)
- 《少年派2》:新男友竟脚踩两只船,林妙妙与钱三一感情回温
- MySQL修改SQL语句优化性能
猜你喜欢
Google Earth Engine - Error resolution of Error: Image.clipToBoundsAndScale, argument 'input': Invalid type
Completely closed Chrome updated and in the top right corner of the tip
【入门教程】Rollup模块打包器整合
纽约大学等 | TM-Vec:用于快速同源检测和比对的模版建模向量
设备树——dtb格式到struct device node结构体的转换
让你的 Lottie 支持文字区域内自动换行
HCIP(14)
The fledgling Xiao Li's 114th blog project notes: Wisdom cloud intelligent flower watering device combat (3) - basic Demo implementation
Game Security 03: A Simple Explanation of Buffer Overflow Attacks
MYSQL two-phase commit
随机推荐
Flutter “Hello world“ 程代码
IDEA debugging
【 Make YOLO Great Again 】 YOLOv1 v7 full range with large parsing (Neck)
The fledgling Xiao Li's 112th blog project notes: Wisdom cloud intelligent flower watering device actual combat (1) - basic Demo implementation
[Data analysis] Based on matlab GUI student achievement management system [including Matlab source code 1981]
项目越写越大,我是这样做拆分的
Raspberry pie arm version of GCC installed configuration and environment variables
[Search topic] After reading the inevitable BFS solution to the shortest path problem
pdb药物综合数据库
MySQL3
device node结构体转换成platform_device结构体
初出茅庐的小李第113篇博客项目笔记之机智云智能浇花器实战(2)-基础Demo实现
<JDBC> 批量插入 的四种实现方式:你真的get到了吗?
Lua introductory case of actual combat 1234 custom function and the standard library function
带你体验一次类型编程实践
【SemiDrive源码分析】系列文章链接汇总(全)
MYSQL logical architecture
This map drawing tool is amazing, I recommend it~~
《少年派2》:新男友竟脚踩两只船,林妙妙与钱三一感情回温
Introduction to Oracle