コード例 #1
0
        static void Main(string[] args)
        {
            var appConfigurationRoot      = new AppConfigurationRootProvider().Get();
            var serverConfigurationHelper = new ServerConfigurationHelper(appConfigurationRoot);
            var bus = new BusConfigurator(serverConfigurationHelper).ConfigureBus((cfg, host) =>
            {
                cfg.ReceiveEndpoint(host, OrderNotificationConstants.OrderNotificationServiceQueue, e =>
                {
                    e.Consumer <OrderNotificationConsumer>();
                });
            });

            bus.Start();

            Console.WriteLine("Listening...", Color.Cyan);

            Console.ReadKey();

            bus.Stop();
        }