Пример #1
0
 static void Main(string[] args)
 {
     var bus = new ServiceBus("test_queue");
     bus.Start();
     string textMessage;
     while (!String.IsNullOrWhiteSpace((textMessage = Console.ReadLine())))
     {
         var message = new TestMessage { Id = Guid.NewGuid(), Timestamp = DateTime.Now, Message = textMessage };
         bus.Publish(message);
     }
 }
Пример #2
0
 private static void TestMessageHandler(TestMessage m)
 {
     Console.WriteLine("{0} : {1} ", m.Timestamp, m.Message);
 }
Пример #3
0
 private static void TestMessageHandler(TestMessage m)
 {
     Console.WriteLine("{0} : {1} ", m.Timestamp, m.Message);
 }