Broker的功能点很多,安装程序启动的顺序去看源码,发现代码量比之前的组件要大很多。阅读过程中发现Broker会去持久化一些配置,并且会将消息数据存储在磁盘上。
整理和检索了网上的一些资料,列出了这些文件和相应的作用,如下。
- store
- commitlog
- 000000000
- xxxxxxxxxx
- compaction
- compactionLog
- {topic}
- 0
- 1
- …
- {queueId}
- {topic}
- compactionCq
- {topic}
- 0
- 1
- …
- {queueId}
- {topic}
- compactionLog
- config
- delayOffset.json
- broker.properties
- topics.json
- topicQueueMapping.json
- consumerOffset.json
- lmqConsumerOffset.json
- consumerOrderInfo.json
- subscriptionGroup.json
- timercheck
- timermetrics
- consumerFilter.json
- messageRequestMode.json
- tieredStoreMetadata.json
- consumequeue
- {topic}
- 0
- 00000000000000000000
- 1
- …
- {queueId}
- 0
- {topic}
- index
- 20240305101010000
- abort
- checkpoint
- lock
- timerwheel
- timerlog
- 00000000000000000000
- commitlog