com.alibaba.rocketmq.store.index.IndexService Java Examples
The following examples show how to use
com.alibaba.rocketmq.store.index.IndexService.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: DefaultMessageStore.java From reading-and-annotate-rocketmq-3.4.6 with GNU General Public License v3.0 | 5 votes |
public DefaultMessageStore(final MessageStoreConfig messageStoreConfig, final BrokerStatsManager brokerStatsManager, final MessageArrivingListener messageArrivingListener, final BrokerConfig brokerConfig) throws IOException { this.messageArrivingListener = messageArrivingListener; this.brokerConfig = brokerConfig; this.messageStoreConfig = messageStoreConfig; this.brokerStatsManager = brokerStatsManager; this.allocateMapedFileService = new AllocateMapedFileService(this); this.commitLog = new CommitLog(this); this.consumeQueueTable = new ConcurrentHashMap<String/* topic */, ConcurrentHashMap<Integer/* queueId */, ConsumeQueue>>(32); this.flushConsumeQueueService = new FlushConsumeQueueService(); //磁盘超过水位进行清理 this.cleanCommitLogService = new CleanCommitLogService(); this.cleanConsumeQueueService = new CleanConsumeQueueService(); this.storeStatsService = new StoreStatsService(); this.indexService = new IndexService(this); this.haService = new HAService(this); //异步构建CQ和索引文件的服务。 this.reputMessageService = new ReputMessageService(); //延迟消息投递服务 this.scheduleMessageService = new ScheduleMessageService(this); this.allocateMapedFileService.start(); this.indexService.start(); }
Example #2
Source File: DefaultMessageStore.java From rocketmq with Apache License 2.0 | 5 votes |
public DefaultMessageStore(final MessageStoreConfig messageStoreConfig, final BrokerStatsManager brokerStatsManager, final MessageArrivingListener messageArrivingListener, final TransactionCheckExecuter transactionCheckExecuter,final BrokerConfig brokerConfig) throws IOException { this.messageArrivingListener = messageArrivingListener; this.transactionCheckExecuter = transactionCheckExecuter; this.brokerConfig = brokerConfig; this.messageStoreConfig = messageStoreConfig; this.brokerStatsManager = brokerStatsManager; this.allocateMapedFileService = new AllocateMapedFileService(this); this.commitLog = new CommitLog(this); this.consumeQueueTable = new ConcurrentHashMap<String/* topic */, ConcurrentHashMap<Integer/* queueId */, ConsumeQueue>>(32); this.flushConsumeQueueService = new FlushConsumeQueueService(); this.cleanCommitLogService = new CleanCommitLogService(); this.cleanConsumeQueueService = new CleanConsumeQueueService(); this.storeStatsService = new StoreStatsService(); this.indexService = new IndexService(this); this.haService = new HAService(this); this.transactionStateService = new TransactionStateService(this); this.reputMessageService = new ReputMessageService(); this.scheduleMessageService = new ScheduleMessageService(this); this.allocateMapedFileService.start(); this.indexService.start(); }
Example #3
Source File: DefaultMessageStore.java From RocketMQ-Master-analyze with Apache License 2.0 | 4 votes |
public DefaultMessageStore(final MessageStoreConfig messageStoreConfig, final BrokerStatsManager brokerStatsManager) throws IOException { this.messageStoreConfig = messageStoreConfig; this.brokerStatsManager = brokerStatsManager; this.allocateMapedFileService = new AllocateMapedFileService(); this.commitLog = new CommitLog(this); this.consumeQueueTable = new ConcurrentHashMap<String/* topic */, ConcurrentHashMap<Integer/* queueId */, ConsumeQueue>>( 32); this.flushConsumeQueueService = new FlushConsumeQueueService(); this.cleanCommitLogService = new CleanCommitLogService(); this.cleanConsumeQueueService = new CleanConsumeQueueService(); this.dispatchMessageService = new DispatchMessageService(this.messageStoreConfig.getPutMsgIndexHightWater()); this.storeStatsService = new StoreStatsService(); this.indexService = new IndexService(this); this.haService = new HAService(this); switch (this.messageStoreConfig.getBrokerRole()) { case SLAVE: this.reputMessageService = new ReputMessageService(); // reputMessageService依赖scheduleMessageService做定时消息的恢复,确保储备数据一致 this.scheduleMessageService = new ScheduleMessageService(this); break; case ASYNC_MASTER: case SYNC_MASTER: this.reputMessageService = null; this.scheduleMessageService = new ScheduleMessageService(this); break; default: this.reputMessageService = null; this.scheduleMessageService = null; } // load过程依赖此服务,所以提前启动 this.allocateMapedFileService.start(); this.dispatchMessageService.start(); // 因为下面的recover会分发请求到索引服务,如果不启动,分发过程会被流控 this.indexService.start(); }