Exemplo n.º 1
0
        /// <summary>
        /// 监听“创建新地区”的队列
        /// </summary>
        /// <param name="manager"></param>
        /// <param name="config"></param>
        private static void MonitorNewParking(MQServcieManager mqManager, MQConfig config)
        {
            MQQueueInfo mQQueueInfo11 = new MQQueueInfo()
            {
                QueueName    = MQManufacturerCode + "NewCityCodeQueue",
                RoutingKey   = "NewCityCode4007004008",
                ExchangeType = RabbitMQ.Client.ExchangeType.Direct,
                ExchangeName = MQYunCameraExchange.DirectDynamicAddNewCityCode
            };

            IMQService mQService = new CreateMQService(config, mQQueueInfo11);

            mqManager.AddServices(mQService);
        }
Exemplo n.º 2
0
        /// <summary>
        /// 监听“付款数据”的队列
        /// </summary>
        /// <param name="mqManager"></param>
        /// <param name="config"></param>
        private static void MonitorPayData(MQServcieManager mqManager, MQConfig config)
        {
            MQQueueInfo mQQueueInfo11 = new MQQueueInfo()
            {
                QueueName    = MQManufacturerCode + "PayDataQueue.YunPark",
                RoutingKey   = "PayData4007004008",
                ExchangeType = RabbitMQ.Client.ExchangeType.Topic,
                ExchangeName = MQYunCameraExchange.TopicPushPayDataToYunParkExchange
            };

            IMQService mQService = new CreateMQService(config, mQQueueInfo11);

            mqManager.AddServices(mQService);
        }
Exemplo n.º 3
0
        /// <summary>
        /// 初始化每个地区创建独立监听队列
        /// (区号 如:0755、0731)
        /// </summary>
        /// <param name="manager"></param>
        /// <param name="config"></param>
        private static void InitMonitorCityCode(MQServcieManager mqManager, MQConfig config, string cityCode)
        {
            //接收数据队列
            MQQueueInfo mQQueueInfo1 = new MQQueueInfo()
            {
                QueueName    = MQManufacturerCode + cityCode + "YunParkCameraQueue",
                RoutingKey   = cityCode,
                ExchangeType = RabbitMQ.Client.ExchangeType.Topic
            };

            IMQService mQService = new CreateMQService(config, mQQueueInfo1);

            mQService.Exchange = MQYunCameraExchange.TopicFuJiCaYunCameraParkPushExchange;
            mqManager.AddServices(mQService);
        }