Exemple #1
0
        public PullController(string appCode, string metaServer)
        {
            BrokerGroupService = new BrokerGroupService(appCode, metaServer);
            var sendMessageBackService = new SendMessageBackService(BrokerGroupService);

            AckMessageService      = new AckMessageService(BrokerGroupService);
            AckHandlerQueueManager = new AckHandlerQueueManager(AckMessageService, sendMessageBackService);
            PullMessageService     = new PullMessageService(AckHandlerQueueManager);
        }
        public AckHandlerQueue(string subject, string group, string brokerGroup, bool isBroadcast, AckMessageService ackMessageService, SendMessageBackService sendMessageBackService)
        {
            Subject                = subject;
            Group                  = group;
            _brokerGroup           = brokerGroup;
            _isBroadcast           = isBroadcast;
            _ackMessageService     = ackMessageService;
            _ackRequestQueue       = new ConcurrentQueue <AckRequest>();
            SendMessageBackService = sendMessageBackService;

            MinPullOffset = -1;
            MaxPullOffset = -1;

            Scheduler.INSTANCE.ScheduleAtFixDelay(ForceSendAck, TryForceSendAckIntervalSeconds);
        }
 public AckHandlerQueueManager(AckMessageService ackMessageService, SendMessageBackService sendMessageBackService)
 {
     _ackMessageService      = ackMessageService;
     _sendMessageBackService = sendMessageBackService;
 }