rocketmq

为什么QueueData要是列表,因为一个topic可能存在于不同的broker上面。表示的含义是某个topic在broker里面有几个队列。

之余broker启动时候的,ConsumerOffsetManage 里面 

private ConcurrentMap<String/* topic@group */, ConcurrentMap<Integer, Long>> offsetTable =
new ConcurrentHashMap<String, ConcurrentMap<Integer, Long>>(512);
含义解释,topic@group含义清楚,后面的map,其实是本broker里面各个队列的消费量。


commit 针对消息存储于writeBuffer里面的情况,commit 后,就调用channel.write(buffer),写入缓冲区。后续flush刷入磁盘。
那么问题,什么时候是writebuffer,什么时候不用writebuffer呢?

设置异步刷盘 transientStorePoolEnable 为true,且是master broker时,申请直接内存byterbuffer。先将消息写入bytebuffer ,然后刷屏呢时候先commit,在flush到磁盘。

posted on 2018-04-21 22:26  newlx  阅读(135)  评论(0)    收藏  举报