static void Main() { var bus = new ServiceBus { LocalEndpoint = "minibuss_publisher1" }; bus.HandleSubscriptionsFor<SomethingHappenedEvent>(); bus.Start(); Task.Factory.StartNew(() => PublishingThread(bus), TaskCreationOptions.LongRunning); Console.WriteLine("Working, press ENTER to exit"); Console.ReadLine(); }
static void Main() { var bus = new ServiceBus { LocalEndpoint = "minibuss_publisher1" }; bus.HandleSubscriptionsFor <SomethingHappenedEvent>(); bus.Start(); Task.Factory.StartNew(() => PublishingThread(bus), TaskCreationOptions.LongRunning); Console.WriteLine("Working, press ENTER to exit"); Console.ReadLine(); }