/// <summary> /// /// </summary> public ActiveMQPoolConnectionManager(IMqConfigService clusterService, int maxConnectCount = 5) { _clusterService = clusterService; _logger = LoggerFactory.GetLog(); MaxConnectCount = maxConnectCount; _poolItemList = new ConcurrentDictionary <Guid, PoolItem>(); }
/// <summary> /// /// </summary> public TCSoftServiceBus() { _listenerService = new ConfigCenterMqListenerService(); _clusterService = new MqConfigService(); _poolConnectionManager = new ActiveMQPoolConnectionManager(_clusterService); this.MQProducerService = new MqProducerService(_clusterService, _poolConnectionManager); var topicVistorList = new List <IMqCommandTopicVistor>() { new AutoUpdateCommandVistor(_listenerService) }; var queueVistorList = new List <IMqCommandQuqueVistor>() { new ChargeInfoTableMqCommandQuqueVistor(), new AppHeartbeatCommandVistor(_listenerService), new DeviceHeatbeatCommandVistor( ), new AppRegisterCommandVistor(_listenerService), new DeviceRegisterCommandVistor() }; _mqListenerFactoryThreadService = new MqListenerFactoryThreadService( _clusterService, _listenerService, topicVistorList, queueVistorList); this.Starting += OnStarting; this.Stoped += OnStoped; }
/// <summary> /// /// </summary> public ActiveMqdlqFactoryThreadService( ) { this._configCenterService = new MqConfigService(); _services = new List <ActiveMqdlqMqListenerService>(); Stoping += OnStoping; Started += OnStarted; }
/// <summary> /// /// </summary> /// <param name="configCenterService"></param> /// <param name="topicVistors"></param> /// <param name="queueVistors"></param> public MqListenerFactoryThreadService( IMqConfigService configCenterService, IConfigCenterMqListenerService listenerService, IEnumerable <IMqCommandTopicVistor> topicVistors, IEnumerable <IMqCommandQuqueVistor> queueVistors) { _listenerAppId = ProcessLockHelper.GetProcessLockId(); _configCenterMqListenerService = listenerService; _cacheManager = new FileCacheManager <ConcurrentDictionary <int, MqInstanceInfo> >((int)CacheRegionName.FileMqDeleteInstace); this._configCenterService = configCenterService; _topicVistors = topicVistors; _queueVistors = queueVistors; _serviceList = new ConcurrentDictionary <int, MqListenerService>(); _delInstanceInfos = new ConcurrentDictionary <int, MqInstanceInfo>(); _excuteInfoDictionary = new ConcurrentDictionary <string, ExcuteInfo>(); Stoped += OnStoped; Stoping += OnStoping; Starting += OnStarting; }
/// <summary> /// /// </summary> public MqProducerService(IMqConfigService clusterService, ActiveMQPoolConnectionManager poolConnectionManager) { _logger = LoggerFactory.GetLog(); _clusterService = clusterService; _poolConnectionManager = poolConnectionManager; }