-
Notifications
You must be signed in to change notification settings - Fork 653
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
A discussion of the current config API in v5 #2240
Comments
@andreasohlund - thoughts? |
I'd say we need to fix this. What are our options?
On Tue, Jul 22, 2014 at 6:16 PM, Indu Alagarsamy notifications@github.com
|
I say we port the rest of the stuff that we haven't to the Customize method, so all of the configuration can be applied in the IWantToConfigureThisEndpoint's Customize method. So the v5 story will be a super clean configuration story that gets rid of the ugly ordering. |
Partly fixed in v5, please reopen fine grained issues if needed |
So in v4 a config story might look like this
or this
the new API in the v5 beta would be
The differences
So what do people think of the following?
No more "unobtrusive configuration"
So in v4 it was possible to do "true unobtrusive configuration". By that I mean you could implement
IWantToRunBeforeConfiguration
, do any configuration, then have that picked up by NSB assembly/type scanning and it would be applied. In v5 this is no longer possible. The closest that can be achieve is a helper method that is explicitly called from within theIConfigureThisEndpoint.Customize
.A split forced split of the configuration code
With the new v5 approach we are forcing people to split their configuration code between two methods. There is problematic since there is no way someone can guess at what types of configuration should be in each method. The fact that this split is needed is an implementation detail that should not be inflicted on the user.
The extension points are split over two interfaces
The configuration story is split across two interfaces
IConfigureThisEndpoint
andINeedInitialization
. Which is strange when most people will need to implement both. Also the naming ofINeedInitialization
in no way implies it should be used to manipulate the configuration on the endpoint.The extension points are split over two assemblies
The configuration story is split across two assemblies
NServiceBus.Core.dll
andNServiceBus.Host.exe
which is very confusing.There can only be one IConfigureThisEndpoint but there can be multiple INeedInitialization
Is this by design? If these interfaces will most likely always be paired why the difference?
IConfigureThisEndpoint must exist on the EndpointConfig class but INeedInitialization can exist anywhere
Again. Is this by design? If these interfaces will most likely always be paired why the difference?
The text was updated successfully, but these errors were encountered: