AxonFramework / extension-springcloud

Axon Framework extension for Spring Cloud's Discovery mechanism integration to distribute Command messages.
https://axoniq.io/
Apache License 2.0
26 stars 16 forks source link

[#327] Default local `ServiceInstance` to a fixed `URI` i.o. `null` #330

Closed smcvb closed 10 months ago

smcvb commented 10 months ago

This pull request defaults the ServiceInstance of the AbstractCapabilityDiscoveryMode to a private ServiceInstance with a fixed URI.

Doing so, we prevent a scenario when the CapabilityDiscoveryMode#updateLocalCapabilities is never invoked, leading to a null ServiceInstance. Preventing this scenario ensures that Axon Framework instances that have zero command handlers will not fail on the "is this the local node I am asking capabilities for"-check, when retrieving the capabilities of other instances.

This pull request resolves #327

sonarcloud[bot] commented 10 months ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication