首页 > 其他 > 详细

RocketMQ源码 索引文件/indexFile 和 消费队列/ConsumeQueue

时间:2021-08-22 21:36:12      阅读:26      评论:0      收藏:0      [点我收藏+]

indexFile(索引文件)和 ConsumeQueue(消费队列),都是为了更快的查找而建立的索引,后者是根据topic,前者是根据key。在ReputMessageService(一个ServiceThread的实现类)的doReput方法中,会循环遍历每一条新收到的消息,

DefaultMessageStore.this.doDispatch(dispatchRequest)-->CommitLogDispatcherBuildIndex/CommitLogDispatcherBuildConsumeQueue .doDispatch,

先看前者,到了indexService.buildIndex,

RocketMQ源码 索引文件/indexFile 和 消费队列/ConsumeQueue

原文:https://www.cnblogs.com/chuliang/p/15173191.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!