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

Move .UseNServicebus to IServiceCollection (Or create seperate exension method) #105

Open
moanrose opened this issue Oct 19, 2020 · 3 comments

Comments

@moanrose
Copy link

Currently it is impossible to choose whether to initialize NServicebus or not based on configuration

I would suggest changing the UseNServicebus extension method, so that it extends IServiceCollection - or create seperate exension method with the following signature

public static void UseNServiceBus(this IServiceCollection serviceCollection, Func<HostBuilderContext, EndpointConfiguration> endpointConfigurationBuilder)

That way you can conditionally initialize NServicebus in ConfigureServices

@danielmarbach
Copy link
Contributor

Hi Morten

Currently it is impossible to choose whether to initialize NServicebus or not based on configuration

Can you add some more context to this. I'm not sure I understand what you mean. Maybe you can write some code snippets and annotate it with comments so that we can see what blockers you are facing?

Thanks
Daniel

@kbaley
Copy link
Contributor

kbaley commented Sep 2, 2022

@moanrose Can you describe the scenario this would be used? Are you looking to do something like "if this happens then use NServiceBus, otherwise use this other thing"?

@moanrose
Copy link
Author

moanrose commented Sep 2, 2022

@kbaley Kyle, it is a bit vague in my memory, but i believe it was one of the latter:

  • "Allow me to switch back to my old way of doing things using configuration, if NServicebus or transport gives us problems i production." (Feature flag)
  • "If there is no connectivity to my transport upon startup, dont leave my application dead in the water, but use this other thing"

I dont have acces to the codebase, or the backlog anymore

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

3 participants