/// <summary> /// Ensures that the exchanges belonging to this system's workflow exist with the specified configuration /// </summary> private void EnsureExchanges(IConfigurationProvider configurationProvider) { var exchangeConfigurations = _queueConfigurations.Where(x => !string.IsNullOrEmpty(x.ExchangeIdentifier)).Select(x => configurationProvider.GetExchangeConfiguration(x.ExchangeIdentifier)); foreach (var exchange in exchangeConfigurations) { _connectionFactory.CreateExchange(exchange.ExchangeIdentifier, exchange.Type, exchange.AlternateExchangeIdentifier); } }