public void Run() { using (var bus = RabbitHutch.CreateBus(Connection.Local())) { ForexiteDownloadMessage downloadFileMessage = new ForexiteDownloadMessage(); CoronaVirusScrapeMessage cvMsg = new CoronaVirusScrapeMessage(); bus.Send("cv.scraper.queue.doscrape", cvMsg); EmailMessage emailMsg = new EmailMessage() { Body = "hello from easynetq", Subject = "test rmq" }; emailMsg.Recipients = new List <string> { { "*****@*****.**" }, { "*****@*****.**" }, { "*****@*****.**" }, }; bus.Send <EmailMessage>("queue.test", emailMsg); //bus.Send<DownloadFileMessage>("queue.test", downloadFileMessage); //TextMessage txtMsg = new TextMessage() { Text = "text message" }; //bus.Send<TextMessage>("queue.test", txtMsg); } }
private void HandleCvMessage(CoronaVirusScrapeMessage emailMsg) { try { int i = 2; } catch (Exception ex) { throw; } }