Пример #1
0
        protected override void ConfigureInputQueueEndpoint(IInMemoryReceiveEndpointConfigurator configurator)
        {
            configurator.UseConcurrencyLimit(1);

            var builder = new ContainerBuilder();

            builder.RegisterModule <ConsumerModule>();

            _container = builder.Build();

            // uses the registry which we should resolve in the method
            configurator.ConsumerInScope <OrderUpdateConsumer, string>(_container);

            _updated = Handled <OrderUpdated>(configurator, context => context.Message.OrderId == "123" && context.Message.OrderStatus == "Processed");
        }