public ReceiveEndpoint CreateReceiveEndpoint(IBusInstance busInstance) { var endpointConfiguration = busInstance.HostConfiguration.CreateReceiveEndpointConfiguration(EndpointName); endpointConfiguration.ConnectReceiveEndpointObserver(_endpointObservers); var configurator = new EventHubReceiveEndpointConfigurator(_hostConfiguration, _eventHubName, _consumerGroup, busInstance, endpointConfiguration); _configure?.Invoke(configurator); var result = BusConfigurationResult.CompileResults(configurator.Validate()); try { return(configurator.Build()); } catch (Exception ex) { throw new ConfigurationException(result, "An exception occurred creating the EventHub receive endpoint", ex); } }
public IEventHubReceiveEndpoint Create(IBusInstance busInstance) { var endpointConfiguration = busInstance.HostConfiguration.CreateReceiveEndpointConfiguration($"{EventHubEndpointAddress.PathPrefix}/{Name}"); endpointConfiguration.ConnectReceiveEndpointObserver(_endpointObservers); var configurator = new EventHubReceiveEndpointConfigurator(Name, _consumerGroup, _hostSettings, _storageSettings, busInstance, endpointConfiguration); _configure?.Invoke(configurator); var result = BusConfigurationResult.CompileResults(configurator.Validate()); try { return(configurator.Build()); } catch (Exception ex) { throw new ConfigurationException(result, "An exception occurred creating the EventDataReceiver", ex); } }