private MessageConverterConfigurer CreateConverterConfigurer(string channelName, BindingOptions bindingProperties) { var bindingServiceProperties = new BindingServiceOptions(); bindingServiceProperties.Bindings.Add(channelName, bindingProperties); var applicationContext = GetBinder().ApplicationContext; var extractors = applicationContext.GetServices <IPartitionKeyExtractorStrategy>(); var selectors = applicationContext.GetServices <IPartitionSelectorStrategy>(); var bindingServiceOptionsMonitor = new BindingServiceOptionsMonitor(bindingServiceProperties); MessageConverterConfigurer messageConverterConfigurer = new MessageConverterConfigurer(applicationContext, bindingServiceOptionsMonitor, new CompositeMessageConverterFactory(), extractors, selectors); return(messageConverterConfigurer); }
private IMessageChannel CreateDynamic(string name, BindingServiceOptions options) { var channel = _bindingTargetFactory.CreateOutput(name); if (_newBindingCallback != null) { var producerOptions = options.GetProducerOptions(name); _newBindingCallback.Configure(name, channel, producerOptions, null); options.UpdateProducerOptions(name, producerOptions); } var binding = _bindingService.BindProducer(channel, name); _dynamicDestinationsBindable.AddOutputBinding(name, binding); return(channel); }
internal BindingService(BindingServiceOptions bindingServiceOptions, IBinderFactory binderFactory) { _bindingServiceOptions = bindingServiceOptions; _binderFactory = binderFactory; }
internal BindingService(BindingServiceOptions bindingServiceOptions, IBinderFactory binderFactory, ILogger <BindingService> logger = null) { _bindingServiceOptions = bindingServiceOptions; _binderFactory = binderFactory; _logger = logger; }