Пример #1
0
 public void Start()
 {
     _topicQueueDict.Clear();
     _messageStore.Recover();
     _offsetManager.Recover();
     RecoverTopicQueues();
     _messageStore.Start();
     _offsetManager.Start();
     _deleteConsumedMessageTaskId = _scheduleService.ScheduleTask(
         DeleteConsumedMessage,
         _brokerController.Setting.DeleteMessageInterval,
         _brokerController.Setting.DeleteMessageInterval);
 }
Пример #2
0
        static void InitializeEQueue()
        {
            var configuration = ECommonConfiguration
                                .Create()
                                .UseAutofac()
                                .RegisterCommonComponents()
                                .UseLog4Net()
                                .UseJsonNet()
                                .RegisterUnhandledExceptionHandler()
                                .RegisterEQueueComponents();

            BrokerController.Create(new BrokerSetting(false, ConfigurationManager.AppSettings["fileStoreRootPath"], enableCache: false, syncFlush: bool.Parse(ConfigurationManager.AppSettings["syncFlush"])));

            _messageStore       = ObjectContainer.Resolve <IMessageStore>();
            _performanceService = ObjectContainer.Resolve <IPerformanceService>();
            _performanceService.Initialize("StoreMessage").Start();
            _messageStore.Load();
            _messageStore.Start();
        }
Пример #3
0
        static void InitializeEQueue()
        {
            var configuration = ECommonConfiguration
                .Create()
                .UseAutofac()
                .RegisterCommonComponents()
                .UseLog4Net()
                .UseJsonNet()
                .RegisterUnhandledExceptionHandler()
                .RegisterEQueueComponents();

            BrokerController.Create(new BrokerSetting(ConfigurationManager.AppSettings["fileStoreRootPath"], 1024 * 1024 * 1024, enableCache: false));

            _messageStore = ObjectContainer.Resolve<IMessageStore>();
            _scheduleService = ObjectContainer.Resolve<IScheduleService>();
            _logger = ObjectContainer.Resolve<ILoggerFactory>().Create(typeof(Program).Name);

            _messageStore.Load();
            _messageStore.Start();
        }
Пример #4
0
        static void InitializeEQueue()
        {
            var configuration = ECommonConfiguration
                                .Create()
                                .UseAutofac()
                                .RegisterCommonComponents()
                                .UseLog4Net()
                                .UseJsonNet()
                                .RegisterUnhandledExceptionHandler()
                                .RegisterEQueueComponents();

            BrokerController.Create(new BrokerSetting(ConfigurationManager.AppSettings["fileStoreRootPath"], enableCache: false));

            _messageStore    = ObjectContainer.Resolve <IMessageStore>();
            _scheduleService = ObjectContainer.Resolve <IScheduleService>();
            _logger          = ObjectContainer.Resolve <ILoggerFactory>().Create(typeof(Program).Name);

            _messageStore.Load();
            _messageStore.Start();
        }
Пример #5
0
 public void Start()
 {
     _totalRecoveredQueueIndex = 0;
     _messageStore.Recover(_offsetManager.GetQueueConsumedOffsets(), ProcessRecoveredMessage);
     _messageStore.Start();
 }