美文网首页
rocketmq MappedFile读写commitlog文件

rocketmq MappedFile读写commitlog文件

作者: Britney_z | 来源:发表于2021-08-19 16:53 被阅读0次

使用的是DirectByteBuffer来操作,省去了用户和系统之间的拷贝。

CommitLog的putMessage方法,会找到last  MappedFile。

MappedFile会有当前写入的位置和文件大小

DirectByteBuffer写入 例如topic、queueid、创建时间、存储时间、offset、body等

下一节说如何刷新到commitlog文件

相关文章

网友评论

      本文标题:rocketmq MappedFile读写commitlog文件

      本文链接:https://www.haomeiwen.com/subject/cdrabltx.html