Fix property-based Load Balancing Strategy configuration bug #2802
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Although Spring resolved the name for the load balancing properties based on the
@ConfigurationProperties
annotation on the getter of theAxonServerConfiguration.EventHandlingConfiguration
, it was unable to set the properties in this format.I assume this has to do with the discrepancy between the defined property and the field and its getter/setter.
To keep the property path name that's already propagated throughout our user base, I've opted to rename the
AxonServerConfigurationEventProcessorConfiguration
toAxonServerConfiguration
Eventhandling. By doing so, we align with the path
"axon.axonserver.eventhandling"`.Although we should strictly regard this as a breaking change, I think the chances are minimal somebody interacts with the object, i.o. through a property file.
Next to this, I have renamed the method returning the field
automaticBalancing
fromshouldAutomaticallyBalance
toisAutomaticBalancing
.Although this time, the IDE did resolve the
axon.axonserver.eventhandling.processors.[processor-name].automatic-balancing
property, it did complain that it could not resolve it.After adjusting the getter to align with the property name, the IDE no longer complained.
Similarly, as with the class rename, we should regard this as a breaking change.
But, again, similarly, I do not anticipate users to interact directly with this operation and instead use the property files.