public QueryConsumerInfoRequestHandler()
 {
     _binarySerializer = ObjectContainer.Resolve<IBinarySerializer>();
     _offsetStore = ObjectContainer.Resolve<IConsumeOffsetStore>();
     _consumerManager = ObjectContainer.Resolve<ConsumerManager>();
     _queueService = ObjectContainer.Resolve<IQueueStore>();
 }
 public QueryConsumerInfoRequestHandler()
 {
     _binarySerializer = ObjectContainer.Resolve <IBinarySerializer>();
     _offsetStore      = ObjectContainer.Resolve <IConsumeOffsetStore>();
     _consumerManager  = ObjectContainer.Resolve <ConsumerManager>();
     _queueStore       = ObjectContainer.Resolve <IQueueStore>();
 }
예제 #3
0
 public GetTopicConsumeInfoListService(ConsumerManager consumerManager, IConsumeOffsetStore consumeOffsetStore, IQueueStore queueStore, ITpsStatisticService tpsStatisticService)
 {
     _consumerManager     = consumerManager;
     _consumeOffsetStore  = consumeOffsetStore;
     _queueStore          = queueStore;
     _tpsStatisticService = tpsStatisticService;
 }
 public QueryConsumerInfoRequestHandler()
 {
     _binarySerializer = IocManager.Instance.Resolve <ISerializer <byte[]> >();
     _offsetStore      = IocManager.Instance.Resolve <IConsumeOffsetStore>();
     _consumerManager  = IocManager.Instance.Resolve <ConsumerManager>();
     _queueStore       = IocManager.Instance.Resolve <IQueueStore>();
 }
 public GetTopicConsumeInfoListService(ConsumerManager consumerManager, IConsumeOffsetStore consumeOffsetStore, IQueueStore queueStore, ITpsStatisticService tpsStatisticService)
 {
     _consumerManager = consumerManager;
     _consumeOffsetStore = consumeOffsetStore;
     _queueStore = queueStore;
     _tpsStatisticService = tpsStatisticService;
 }
예제 #6
0
        private BrokerController(BrokerSetting setting)
        {
            Setting = setting ?? new BrokerSetting();

            Setting.BrokerInfo.Valid();
            if (Setting.NameServerList == null || Setting.NameServerList.Count() == 0)
            {
                throw new ArgumentException("NameServerList is empty.");
            }

            _latestMessageIds               = new string[Setting.LatestMessageShowCount];
            _producerManager                = ObjectContainer.Resolve <ProducerManager>();
            _consumerManager                = ObjectContainer.Resolve <ConsumerManager>();
            _messageStore                   = ObjectContainer.Resolve <IMessageStore>();
            _consumeOffsetStore             = ObjectContainer.Resolve <IConsumeOffsetStore>();
            _queueStore                     = ObjectContainer.Resolve <IQueueStore>();
            _getTopicConsumeInfoListService = ObjectContainer.Resolve <GetTopicConsumeInfoListService>();
            _getConsumerListService         = ObjectContainer.Resolve <GetConsumerListService>();
            _scheduleService                = ObjectContainer.Resolve <IScheduleService>();
            _binarySerializer               = ObjectContainer.Resolve <IBinarySerializer>();
            _suspendedPullRequestManager    = ObjectContainer.Resolve <SuspendedPullRequestManager>();
            _chunkReadStatisticService      = ObjectContainer.Resolve <IChunkStatisticService>();
            _tpsStatisticService            = ObjectContainer.Resolve <ITpsStatisticService>();

            _producerSocketRemotingServer = new SocketRemotingServer("EQueue.Broker.ProducerRemotingServer", Setting.BrokerInfo.ProducerAddress.ToEndPoint(), Setting.SocketSetting);
            _consumerSocketRemotingServer = new SocketRemotingServer("EQueue.Broker.ConsumerRemotingServer", Setting.BrokerInfo.ConsumerAddress.ToEndPoint(), Setting.SocketSetting);
            _adminSocketRemotingServer    = new SocketRemotingServer("EQueue.Broker.AdminRemotingServer", Setting.BrokerInfo.AdminAddress.ToEndPoint(), Setting.SocketSetting);

            _logger = ObjectContainer.Resolve <ILoggerFactory>().Create(GetType().FullName);
            _producerSocketRemotingServer.RegisterConnectionEventListener(new ProducerConnectionEventListener(this));
            _consumerSocketRemotingServer.RegisterConnectionEventListener(new ConsumerConnectionEventListener(this));
            RegisterRequestHandlers();
            _nameServerRemotingClientList = Setting.NameServerList.ToRemotingClientList(Setting.SocketSetting).ToList();
        }
예제 #7
0
 public DefaultQueueStore(IMessageStore messageStore, IConsumeOffsetStore consumeOffsetStore, IScheduleService scheduleService, ILoggerFactory loggerFactory)
 {
     _queueDict = new ConcurrentDictionary<string, Queue>();
     _messageStore = messageStore;
     _consumeOffsetStore = consumeOffsetStore;
     _scheduleService = scheduleService;
     _logger = loggerFactory.Create(GetType().FullName);
 }
예제 #8
0
 public DefaultQueueStore(IMessageStore messageStore, IConsumeOffsetStore consumeOffsetStore, IScheduleService scheduleService, ILoggerFactory loggerFactory)
 {
     _queueDict          = new ConcurrentDictionary <string, Queue>();
     _messageStore       = messageStore;
     _consumeOffsetStore = consumeOffsetStore;
     _scheduleService    = scheduleService;
     _logger             = loggerFactory.Create(GetType().FullName);
 }
예제 #9
0
 public PullMessageRequestHandler()
 {
     _consumerManager             = ObjectContainer.Resolve <ConsumerManager>();
     _suspendedPullRequestManager = ObjectContainer.Resolve <SuspendedPullRequestManager>();
     _messageStore = ObjectContainer.Resolve <IMessageStore>();
     _queueStore   = ObjectContainer.Resolve <IQueueStore>();
     _offsetStore  = ObjectContainer.Resolve <IConsumeOffsetStore>();
     _logger       = ObjectContainer.Resolve <ILoggerFactory>().Create(GetType().FullName);
 }
예제 #10
0
 public PullMessageRequestHandler()
 {
     _consumerManager = ObjectContainer.Resolve<ConsumerManager>();
     _suspendedPullRequestManager = ObjectContainer.Resolve<SuspendedPullRequestManager>();
     _messageStore = ObjectContainer.Resolve<IMessageStore>();
     _queueStore = ObjectContainer.Resolve<IQueueStore>();
     _offsetStore = ObjectContainer.Resolve<IConsumeOffsetStore>();
     _logger = ObjectContainer.Resolve<ILoggerFactory>().Create(GetType().FullName);
 }
예제 #11
0
 public DefaultQueueStore(IMessageStore messageStore, IConsumeOffsetStore consumeOffsetStore, IScheduleService scheduleService, ITpsStatisticService tpsStatisticService, ILoggerFactory loggerFactory)
 {
     _queueDict           = new ConcurrentDictionary <QueueKey, Queue>();
     _messageStore        = messageStore;
     _consumeOffsetStore  = consumeOffsetStore;
     _scheduleService     = scheduleService;
     _tpsStatisticService = tpsStatisticService;
     _logger = loggerFactory.Create(GetType().FullName);
     _messageStore.GetMinConsumedMessagePositionFunc = new Func <long>(GetMinConusmedMessagePosition);
 }
예제 #12
0
        private BrokerController(BrokerSetting setting)
        {
            Setting = setting ?? new BrokerSetting();
            _consumerManager = ObjectContainer.Resolve<ConsumerManager>();
            _messageStore = ObjectContainer.Resolve<IMessageStore>();
            _consumeOffsetStore = ObjectContainer.Resolve<IConsumeOffsetStore>();
            _queueStore = ObjectContainer.Resolve<IQueueStore>();
            _suspendedPullRequestManager = ObjectContainer.Resolve<SuspendedPullRequestManager>();
            _chunkReadStatisticService = ObjectContainer.Resolve<IChunkStatisticService>();

            _producerSocketRemotingServer = new SocketRemotingServer("EQueue.Broker.ProducerRemotingServer", Setting.ProducerAddress, Setting.SocketSetting);
            _consumerSocketRemotingServer = new SocketRemotingServer("EQueue.Broker.ConsumerRemotingServer", Setting.ConsumerAddress, Setting.SocketSetting);
            _adminSocketRemotingServer = new SocketRemotingServer("EQueue.Broker.AdminRemotingServer", Setting.AdminAddress, Setting.SocketSetting);

            _logger = ObjectContainer.Resolve<ILoggerFactory>().Create(GetType().FullName);
            _consumerSocketRemotingServer.RegisterConnectionEventListener(new ConsumerConnectionEventListener(this));
            RegisterRequestHandlers();

            _service = new ConsoleEventHandlerService();
            _service.RegisterClosingEventHandler(eventCode => { Shutdown(); });
        }
예제 #13
0
        private BrokerController(BrokerSetting setting)
        {
            Setting                      = setting ?? new BrokerSetting();
            _consumerManager             = ObjectContainer.Resolve <ConsumerManager>();
            _messageStore                = ObjectContainer.Resolve <IMessageStore>();
            _consumeOffsetStore          = ObjectContainer.Resolve <IConsumeOffsetStore>();
            _queueStore                  = ObjectContainer.Resolve <IQueueStore>();
            _suspendedPullRequestManager = ObjectContainer.Resolve <SuspendedPullRequestManager>();
            _chunkReadStatisticService   = ObjectContainer.Resolve <IChunkStatisticService>();

            _producerSocketRemotingServer = new SocketRemotingServer("EQueue.Broker.ProducerRemotingServer", Setting.ProducerAddress, Setting.SocketSetting);
            _consumerSocketRemotingServer = new SocketRemotingServer("EQueue.Broker.ConsumerRemotingServer", Setting.ConsumerAddress, Setting.SocketSetting);
            _adminSocketRemotingServer    = new SocketRemotingServer("EQueue.Broker.AdminRemotingServer", Setting.AdminAddress, Setting.SocketSetting);

            _logger = ObjectContainer.Resolve <ILoggerFactory>().Create(GetType().FullName);
            _consumerSocketRemotingServer.RegisterConnectionEventListener(new ConsumerConnectionEventListener(this));
            RegisterRequestHandlers();

            _service = new ConsoleEventHandlerService();
            _service.RegisterClosingEventHandler(eventCode => { Shutdown(); });
        }
 public DeleteConsumerGroupRequestHandler()
 {
     _binarySerializer = ObjectContainer.Resolve<IBinarySerializer>();
     _offsetStore = ObjectContainer.Resolve<IConsumeOffsetStore>();
     _consumerManager = ObjectContainer.Resolve<ConsumerManager>();
 }
 public DeleteConsumerGroupRequestHandler()
 {
     _binarySerializer = IocManager.Instance.Resolve <ISerializer <byte[]> >();
     _offsetStore      = IocManager.Instance.Resolve <IConsumeOffsetStore>();
     _consumerManager  = IocManager.Instance.Resolve <ConsumerManager>();
 }
 public SetQueueNextConsumeOffsetRequestHandler()
 {
     _offsetStore                 = ObjectContainer.Resolve <IConsumeOffsetStore>();
     _binarySerializer            = ObjectContainer.Resolve <IBinarySerializer>();
     _suspendedPullRequestManager = ObjectContainer.Resolve <SuspendedPullRequestManager>();
 }
예제 #17
0
 public GetTopicQueueInfoRequestHandler()
 {
     _binarySerializer = ObjectContainer.Resolve <IBinarySerializer>();
     _queueStore       = ObjectContainer.Resolve <IQueueStore>();
     _offsetStore      = ObjectContainer.Resolve <IConsumeOffsetStore>();
 }
 public UpdateQueueConsumeOffsetRequestHandler()
 {
     _offsetStore         = ObjectContainer.Resolve <IConsumeOffsetStore>();
     _binarySerializer    = ObjectContainer.Resolve <IBinarySerializer>();
     _tpsStatisticService = ObjectContainer.Resolve <ITpsStatisticService>();
 }
 public GetConsumerListService(ConsumerManager consumerManager, IConsumeOffsetStore consumeOffsetStore, IQueueStore queueStore)
 {
     _consumerManager    = consumerManager;
     _consumeOffsetStore = consumeOffsetStore;
     _queueStore         = queueStore;
 }
 public GetTopicQueueInfoRequestHandler()
 {
     _binarySerializer = ObjectContainer.Resolve<IBinarySerializer>();
     _queueStore = ObjectContainer.Resolve<IQueueStore>();
     _offsetStore = ObjectContainer.Resolve<IConsumeOffsetStore>();
 }
 public UpdateQueueConsumeOffsetRequestHandler()
 {
     _offsetStore = ObjectContainer.Resolve<IConsumeOffsetStore>();
     _binarySerializer = ObjectContainer.Resolve<IBinarySerializer>();
     _tpsStatisticService = ObjectContainer.Resolve<ITpsStatisticService>();
 }
 public SetQueueNextConsumeOffsetRequestHandler()
 {
     _offsetStore = ObjectContainer.Resolve<IConsumeOffsetStore>();
     _binarySerializer = ObjectContainer.Resolve<IBinarySerializer>();
     _suspendedPullRequestManager = ObjectContainer.Resolve<SuspendedPullRequestManager>();
 }
예제 #23
0
 public UpdateQueueOffsetRequestHandler()
 {
     _offsetStore      = IocManager.Instance.Resolve <IConsumeOffsetStore>();
     _binarySerializer = IocManager.Instance.Resolve <ISerializer <byte[]> >();
 }
 public DeleteConsumerGroupRequestHandler()
 {
     _binarySerializer = ObjectContainer.Resolve <IBinarySerializer>();
     _offsetStore      = ObjectContainer.Resolve <IConsumeOffsetStore>();
     _consumerManager  = ObjectContainer.Resolve <ConsumerManager>();
 }
예제 #25
0
 public SetQueueNextConsumeOffsetRequestHandler()
 {
     _offsetStore                 = IocManager.Instance.Resolve <IConsumeOffsetStore>();
     _binarySerializer            = IocManager.Instance.Resolve <ISerializer <byte[]> >();
     _suspendedPullRequestManager = IocManager.Instance.Resolve <SuspendedPullRequestManager>();
 }