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(); }
public static bool CheckConnect() { RabbitQueueCommonService rabbit = new RabbitQueueCommonService(); return(rabbit.CheckConnect()); }