NServiceBus
NServiceBus copied to clipboard
EndpointConfiguration can't be reused when using Installer API
When using the Installer APIs, the EndpointConfiguration can't be reused in the same process, e.g.
await Installer.Setup(configuration);
await Endpoint.Create(configuration);
does not work because the EndpointConfiguration tracks its usage and prevents reusing it. This also makes some sense because the installer has to modify the configuration to enable installers which is currently necessary to ensure correct behavior in downstream installation logic.
In most use cases, it makes sense to run the installer in a separate process anyway and instead use Endpoint.Create/Endpoint.Start when planning to run the installation as part of the same process. This might become an issue in case Endpoint.Create should be deprecated in favor of the more explicit installation API.