Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support safe transport name when binding configuration #581

Merged
merged 1 commit into from
Dec 20, 2023

Conversation

mburumaxwell
Copy link
Contributor

Some hosts do not allow certain characters for ENV vars but we know they all support alphanumeric and underscore. For example, Azure Container Instances does not allow hyphens in ENV vars while Azure Container Apps does.

This PR allows binding configuration for a transport from a section using a safe name (EventBus:Transports:{safeName}) in addition to the default one (EventBus:Transports:{name}). For example, for Azure Service Bus, this binds to EventBus:Transports:azureservicebus and EventBus:Transports:azure-service-bus.

The IEventBusConfigurator.Configure<TOptions>(IConfiguration configuration, TOptions options) where TOptions : EventBusTransportOptions function is always called for the default name but it is only called for the safe name if there is configuration found.

@mburumaxwell mburumaxwell merged commit 59176ab into main Dec 20, 2023
4 checks passed
@mburumaxwell mburumaxwell deleted the safe-transport-name-configuration branch December 20, 2023 06:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant