/// <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> /// <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; }
public AppHeartbeatCommandVistor(IConfigCenterMqListenerService listenerService) { _listenerService = listenerService; }
public AutoUpdateCommandVistor(IConfigCenterMqListenerService listenerService) { _listenerService = listenerService; _logger = LoggerFactory.GetLog(); }
public AppRegisterCommandVistor(IConfigCenterMqListenerService listenerService) { _listenerService = listenerService; }