public RabbitMqGateway(string connectionString, int eventSubscriberThreadCount, int commandHandlerThreadCount, ILocator locator) { _eventSubscriberThreadCount = eventSubscriberThreadCount; _commandHandlerThreadCount = commandHandlerThreadCount; var adapter = new EasyNetQContainerAdapter(locator); RabbitHutch.SetContainerFactory(() => adapter); _externalMessageBus = RabbitHutch.CreateBus(connectionString, register => register.Register<IConsumerErrorStrategy, MyClass>()); _eventBus = locator.Resolve<Core.IEventBus>(); _commandHandlerFactory = locator.Resolve<ICommandHandlerFactory>(); var a = locator.Resolve<IConsumerErrorStrategy>(); }
public RabbitMqGateway(string connectionString, int eventSubscriberThreadCount, int commandHandlerThreadCount, ILocator locator) { _eventSubscriberThreadCount = eventSubscriberThreadCount; _commandHandlerThreadCount = commandHandlerThreadCount; var adapter = new EasyNetQContainerAdapter(locator); RabbitHutch.SetContainerFactory(() => adapter); _externalMessageBus = RabbitHutch.CreateBus(connectionString, register => register.Register <IConsumerErrorStrategy, MyClass>()); _eventBus = locator.Resolve <Core.IEventBus>(); _commandHandlerFactory = locator.Resolve <ICommandHandlerFactory>(); var a = locator.Resolve <IConsumerErrorStrategy>(); }