public BusBuilder Configure(BusBuilder builder) { builder.Match<ServiceBusBuilder>(x => { var settings = new ServiceBusSettings(builder.Settings); settings.InputAddress = _uri ?? builder.Settings.InputAddress.AppendToPath("_control"); // the endpoint factory is already created, so we can't set the endpoint here // we really need this to be part of another step, but i don't have a clue how yet. //_configurator.ConfigureEndpoint(_uri, x => x.PurgeExistingMessages()); if (_log.IsDebugEnabled) _log.DebugFormat("Configuring control bus for {0} at {1}", builder.Settings.InputAddress, settings.InputAddress); settings.ConcurrentConsumerLimit = 1; settings.ConcurrentReceiverLimit = 1; settings.AutoStart = true; BusBuilder controlBusBuilder = new ControlBusBuilderImpl(settings); controlBusBuilder = _configurators .Aggregate(controlBusBuilder, (current, configurator) => configurator.Configure(current)); IControlBus controlBus = controlBusBuilder.Build(); x.UseControlBus(controlBus); }); return builder; }
public BusBuilder Configure(BusBuilder builder) { builder.Match <ServiceBusBuilder>(x => { var settings = new ServiceBusSettings(builder.Settings); settings.InputAddress = _uri ?? builder.Settings.InputAddress.AppendToPath("_control"); // the endpoint factory is already created, so we can't set the endpoint here // we really need this to be part of another step, but i don't have a clue how yet. //_configurator.ConfigureEndpoint(_uri, x => x.PurgeExistingMessages()); if (_log.IsDebugEnabled) { _log.DebugFormat("Configuring control bus for {0} at {1}", builder.Settings.InputAddress, settings.InputAddress); } settings.ConcurrentConsumerLimit = 1; settings.ConcurrentReceiverLimit = 1; settings.AutoStart = true; BusBuilder controlBusBuilder = new ControlBusBuilderImpl(settings); controlBusBuilder = _configurators .Aggregate(controlBusBuilder, (current, configurator) => configurator.Configure(current)); IControlBus controlBus = controlBusBuilder.Build(); x.UseControlBus(controlBus); }); return(builder); }
public ServiceBusConfiguratorImpl(ServiceBusDefaultSettings defaultSettings) { _settings = new ServiceBusSettings(defaultSettings); _builderFactory = DefaultBuilderFactory; _configurators = new List<BusBuilderConfigurator>(); _endpointFactoryConfigurator = new EndpointFactoryConfiguratorImpl(new EndpointFactoryDefaultSettings()); _subscriptionRouterConfigurator = new SubscriptionRouterConfiguratorImpl(_settings.Network); _configurators.Add(_subscriptionRouterConfigurator); }
public ServiceBusConfiguratorImpl(ServiceBusDefaultSettings defaultSettings) { _settings = new ServiceBusSettings(defaultSettings); _builderFactory = DefaultBuilderFactory; _configurators = new List <BusBuilderConfigurator>(); _endpointFactoryConfigurator = new EndpointFactoryConfiguratorImpl(new EndpointFactoryDefaultSettings()); _subscriptionRouterConfigurator = new SubscriptionRouterConfiguratorImpl(_settings.Network); _configurators.Add(_subscriptionRouterConfigurator); }