Пример #1
0
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        static void Main()
        {
            //--初始化ESB代理类
            ESBProxy.GetInstance();

            //ServiceBase[] ServicesToRun;
            //ServicesToRun = new ServiceBase[]
            //{
            //    new StoreAuditService()
            //};
            //ServiceBase.Run(ServicesToRun);

            Console.WriteLine("日志队列处理服务启动。");

            RabbitQueueManager m_RabbitQueueManager = m_RabbitQueueManager = new RabbitQueueManager();
            m_RabbitQueueManager.StartReceive();

            Console.WriteLine("启动成功!");
        }
Пример #2
0
        protected override void OnStart(string[] args)
        {
            XTrace.WriteLine("日志队列处理服务启动。");

            m_RabbitQueueManager = new RabbitQueueManager();
            m_RabbitQueueManager.StartReceive();

            //Thread thread = new Thread(x =>
            //{
            //    try
            //    {
            //        m_QueueManager = new QueueManager();
            //        m_QueueManager.StartReceive();
            //    }
            //    catch (Exception ex)
            //    {
            //        Trace.WriteLine("从队列中获取消息失败:" + ex.ToString());
            //    }

            //});
            //thread.Start();
        }