和broker自己本身相关的组件
- BrokerController
- BrokerStatsManager
- BrokerFastFailure
和remoting相关的组件
- NettyServer
- NettyClient
和消息存储相关的组件
- MessageStore
和consumer 相关的组件
- ConsumerOffsetManager
- ConsumerManager
- ConsumerFilterManager
- SubscriptionGroupManager
- PullMessageProcessor
- PullRequestHoldService
- ConsumerIdsChangeListener
和producer 相关的组件
- ProducerManager
和 cluster 相关的组件
- RebalanceLockManager
- SlaveSynchronize
- slaveSyncFuture
和 transaction 有关的组件
- TransactionalMessageCheckService
- TransactionalMessageService
- AbstractTransactionalMessageCheckListener
broker持有的成员变量
- storeHost
- brokerStats
- brokerFastFailure
- configuration
和produce/consume 相对应的hook
- consumeMessageHookList
- sendMessageHookList
其他不是很明显的,尚待分类的
- Broker2Client
- MessageArrivingListener
- ClientHousekeepingService
- BrokerOuterAPI
- FilterServerManager
- FileWatchService
一些重要方法
- brokerRegisterAll
- registerIncrementalBrokerData
一些和broker角色有关的方法
- handleSlaveSynchronize
- changeToSlave
- changeToMaster
- startProcessorByHa
- shutdownProcessorByHa
我们首先得看RocketMQ broker 支持哪几种命令,给每一类命令相应的Processor都配了专门的ExecutorService
- TransactionalMessageCheckService
- TransactionalMessageService