Пример #1
0
        /// <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;
        }
Пример #2
0
 /// <summary>
 ///
 /// </summary>
 public MqProducerService(IMqConfigService clusterService, ActiveMQPoolConnectionManager poolConnectionManager)
 {
     _logger                = LoggerFactory.GetLog();
     _clusterService        = clusterService;
     _poolConnectionManager = poolConnectionManager;
 }