Пример #1
0
 static void Main(string[] args)
 {
     SetupContainer();
     Console.WriteLine("Hello World!");
     _connectToRabbitMqService = serviceProvider.GetService <IConnectToRabbitMqMessageService>();
     _connectToRabbitMqService.Connect("127.0.0.1", "testuser", "testpassword");
     ConsumeClientNoQueuedMessages();
     while (true)
     {
         //Console.WriteLine("checking...");
         Task.Delay(1000);
     }
 }
Пример #2
0
 public void InitConfigAndConnect(string hostName, string uesrName, string pwd)
 {
     _connectToRabbitMqService.Connect(hostName, uesrName, pwd);
     isConnectedToServer = true;
 }
Пример #3
0
 public void InitConfigAndConnect(string hostName, string uesrName, string pwd, string clientName)
 {
     _connectToRabbitMqService.Connect(hostName, uesrName, pwd, clientName);
     //_machineId = machineId.ToString();
     isConnectedToServer = true;
 }