static void Main(string[] args) { PrepareQueues.Prepare("msmq://localhost/LearningRhinoESB_E9_Customer", QueueType.Standard); PrepareQueues.Prepare("msmq://localhost/LearningRhinoESB_E9_Cashier", QueueType.Standard); PrepareQueues.Prepare("msmq://localhost/LearningRhinoESB_E9_Barista", QueueType.Standard); var customerHost = new DefaultHost(); customerHost.Start <CustomerBootStrapper>(); Console.WriteLine("Customer was started"); Console.WriteLine("Waiting for order"); Console.ReadLine(); var bus = customerHost.Bus as IServiceBus; var customer = new CustomerController(bus) { Drink = "Hot Chocolate", Name = "Ayende", Size = DrinkSize.Venti }; customer.BuyDrinkSync(); Console.ReadLine(); }
static void Main(string[] args) { QueueUtil.PrepareQueue("customer"); var host = new DefaultHost(); host.Start <CustomerBootStrapper>(); Console.WriteLine("Ayende is visiting Starbucks ..."); Console.WriteLine("Hit enter for buying a hot chocolate ..."); //Give the other services a bit air to initialize. Console.ReadLine(); var bus = host.Bus as IServiceBus; var customer = new CustomerController(bus) { Drink = "Hot Chocolate", Name = "Starbucks Lover", Size = DrinkSize.Venti }; customer.BuyDrinkSync(); Console.ReadLine(); }
static void Main(string[] args) { PrepareQueues.Prepare("msmq://localhost/LearningRhinoESB.E5.Customer", QueueType.Standard); var host = new DefaultHost(); host.Start <CustomerBootStrapper>(); Console.WriteLine("Ayende: Visiting Starbucks ..."); Console.ReadLine(); var bus = host.Bus as IServiceBus; var customer = new CustomerController(bus) { Drink = "Hot Chocolate", Name = "Ayende", Size = DrinkSize.Venti }; customer.BuyDrinkSync(); Console.ReadLine(); }