当前位置:网站首页>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
边栏推荐
- Completely closed Chrome updated and in the top right corner of the tip
- Unknown Bounded Array
- 软件测试周刊(第82期):其实所有纠结做选择的人心里早就有了答案,咨询只是想得到内心所倾向的选择。
- Google Earth Engine - Error resolution of Error: Image.clipToBoundsAndScale, argument 'input': Invalid type
- Nmap 操作手册 - 完整版
- MySQL4
- leetcode6132. Make all elements in an array equal to zero (simple, weekly)
- Summary of mobile page optimization in seconds
- 移动端页面秒开优化总结
- 初出茅庐的小李第114篇博客项目笔记之机智云智能浇花器实战(3)-基础Demo实现
猜你喜欢

Solve the problem that when IDEA creates a new file by default, right-click, new, there is no XML file

Elastic Stack的介绍

MYSQL master-slave replication

Software Testing Weekly (Issue 82): In fact, all those who are entangled in making choices already have the answer in their hearts, and consultation is just to get the choice that they prefer.

解决IDEA默认情况下新建文件时,右击,new,没有XML文件的问题

How is the tree structure of the device tree reflected?

TypeScript simplifies running ts-node

Ordinary users cannot access HGFS directory

剑指offer专项突击版第16天

ARM cross compilation
随机推荐
Which interpolation is better for opencv to zoom in and out??
简单易用的任务队列-beanstalkd
Browser download shortcut to desktop (PWA)
Solve the problem that Excel opens very slowly after installing MySQL
Handwritten binary search tree and test
button去除黑框
Chinese version of Pylint inspection rules
MySQL modifies SQL statements to optimize performance
Basic implementation of vector
Modify Postman installation path
leetcode6133. 分组的最大数量(中等)
IDEA does not recognize the module (there is no blue square in the lower right corner of the module)
MYSQL transactions
Four implementations of
batch insert: have you really got it? 软件测试面试(三)
Basic Theoretical Knowledge of Software Testing - Use Cases
The fledgling Xiao Li's 113th blog project notes: Wisdom cloud smart flower watering device combat (2) - basic Demo implementation
Weekly Summary (*67): Why not dare to express an opinion
【uniCloud】云对象的应用与提升
Take you to experience a type programming practice