示例#1
0
        private void Init()
        {
            //var factory = new ConnectionFactory() { HostName = "192.168.10.22", UserName = "******", Password = "******" };
            //connection = factory.CreateConnection();
            RabbitQueueCommonService rabbitService = new RabbitQueueCommonService();

            Connection = rabbitService.Connection(_queueName);
            channel    = Connection.CreateModel();
        }
示例#2
0
        public static bool CheckConnect()
        {
            RabbitQueueCommonService rabbit = new RabbitQueueCommonService();

            return(rabbit.CheckConnect());
        }