rocketmq学习
2023-02-27 12:17:09 0 举报
rocketmq学习
作者其他创作
大纲/内容
write data copy
step1
物理位置
消息
consumer01
read mes from master broker (mmap技术)
3.Create topic
NameServer
8 commit send mes to consumer or delete mes rollback
write to broker there 2 different way to handle those data
地址映射
Local 事务(DB)
step4
pull route info broker discovery
topic:hello_mq:MessageQueue1------->consumerQueue1topic:hello_mq:MessageQueue2------->consumerQueue2
basic concept
3.Exectue Local 事务
pull route info broker discovery
read mes from slave broker
Broker
写入commitLog
virtual memory
consumequeue 1
生产者
CommitLog 文件
read mes from master broker
consumer03
name server 每隔10s向broker发送心跳检测.如果某个broker在120s里面还没发送心跳连接name server认为改broker挂了
Data sync
方式1异步刷盘
same group
事务消息理解
Slave Broker 01message queue01topic:hello_mq
start order
producer01
step5
2.Broker startup
os cache
cluster
message quuue1
mmap
Disk
pull mes broker discovery
MQ消费者
Slave Broker 01message queue01
Slave Broker 03message queue02topic: hello_mq
step3
Master Broker 02message queue02topic : hello_mq
Slave Broker02message queue01
step2
consumequeue 2
异步刷屏方式写入磁盘
send mes
Master Broker 01message queue01
内存级别的缓存
每个broker(M/S)每隔30s向每个NS发送心跳信息
Slave Broker 04message queue02
Master Broker 01message queue01topic : hello_mq
MQ server
4.Producer startup
4.commit or rollback
message quuue2
地址引用
producer03
Master Broker 02message queue02
Slave Broker 03message queue02
flush data to disk
应用程序(用户进程私有空间)
MQ 生产者
Slave Broker 04message queue02topic : hello_mq
1.Nameserver startup
broker写数据到commitLog文件时使用了mmap技术
方式2 同步刷盘
在文件末尾添加一条顺序写
Slave Broker02message queue01topic : hello_mq
1.send half mes
OS线程
6.check state of Local 事务
7.commit or rollback according to to state Local 事务
producer02
(Linux)内核io缓存区
2.half mes ok
step6
Topic: hello_mqBroker: store datahello_mq has 2 mes queue include message queue01 and message queue02
send mes and write data to broker (mmap技术)
5.Consumer startup
read data copy
disk commit Log 文件
OS cache
传统的从磁盘读取数据和应用程序写数据到磁盘逻辑
5.call back when server cann't receive the information of the setp 4
收藏
0 条评论
下一页