static void Main(string[] args) { MqBro rabbitMq = new MqBro(); rabbitMq.Connection(); rabbitMq.MessageReceived += rabbitMq_MessageReceived; while (true) { Thread.Sleep(Sleep); rabbitMq.Received(RoutingKey); } rabbitMq.Disconnection(); }
void _timer_received_Elapsed(object sender, ElapsedEventArgs e) { _messengerMq.Received(); }