public void UnSubscribeHandler(string eventyType)
        {
            if (!_consumeManager.ContainsKey(eventyType))
            {
                string message = $"没有这个类型的EventHandler, eventType:{eventyType}";
                _logger.LogCritical(message);
            }

            ConsumeTaskManager manager = _consumeManager[eventyType];

            manager.Cancel();

            _consumeManager.Remove(eventyType);
        }
        //TODO: 考虑让PublishManager和HistoryManager独立
        //TODO: 考虑用redis替代rabbitmq

        //private void NotifyPublishToRabbitMQ(string brokerName)
        //{
        //    //让 broker 名字为brokerName的 publishmanager开始工作
        //    //publishmanager开始创建Task, publishmanager

        //    //这里已经确保brokerName是存在的了,之前再PublishAsync里已经检查过

        //    _publishManagers[brokerName].NotifyInComming();
        //    _historyManager[brokerName].NotifyInComming();
        //}

        #endregion

        #region Subscribe

        public void SubscribeHandler(string brokerName, string eventType, IEventHandler eventHandler)
        {
            if (!IsBrokerExists(brokerName))
            {
                throw new ArgumentException($"当前没有broker为{brokerName}的RabbitMQ。");
            }

            if (_consumeManager.ContainsKey(eventType))
            {
                string message = $"已经存在相同类型的EventHandler了,eventType : {eventType}";
                _logger.LogCritical(message);

                throw new Exception(message);
            }

            RabbitMQConnectionSetting connectionSetting = _options.GetConnectionSetting(brokerName);

            ConsumeTaskManager manager = new ConsumeTaskManager(eventType, eventHandler, connectionSetting, _connectionManager, _redis, _consumeTaskManagerLogger);

            _consumeManager.Add(eventType, manager);
        }