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

Add Installer support #320

Open
timbussmann opened this issue Oct 7, 2022 · 0 comments
Open

Add Installer support #320

timbussmann opened this issue Oct 7, 2022 · 0 comments

Comments

@timbussmann
Copy link
Contributor

There is currently no way to run installers and endpoint setup (e.g. Endpoint.Create(...)) when using the generic host. The endpoint can only be fully started which might not be a good idea when running installers with special privileges. Additionally, the externally managed container mode used for the generic host doesn't have any ability to run installers separately.

With NServiceBus 8.1, a new Installer API is available to run installers without starting the endpoint. This is also supported for externally managed container mode and can therefore be fully compatibility with the generic host.

But since the endpoint startup APIs aren't directly exposed to user but used by the generic host integration, the generic host needs to provide some way to let users specify that only installation should happen.

This could be done via specific configuration options that can switch between endpoint startup and endpoint installation behavior. This spike shows an example implementation on how to make this work. Using this spike, installers can be run via dotnet run MyEndpoint --nservicebus install or MyEndpoint.exe --nservicebus install.

One limitation to consider are scenarios where additional components are hosted with the host (e.g. asp.net applications, custom hosted services) which can't be directly influenced and need to support cancellation during hosted service startup to avoid being run during installation.

@timbussmann timbussmann changed the title Add Installer support. Add Installer support Oct 7, 2022
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

No branches or pull requests

1 participant