AxonFramework / extension-multitenancy

Axon Framework extension providing handles to support multi tenancy with distinct buses and stores per tenant.
Apache License 2.0
10 stars 2 forks source link

Auto start Axon Server tenant components #160

Closed schananas closed 7 months ago

schananas commented 7 months ago

The fix is rather simple; just start Axon Server components when the factory produces them. Timing is always safe, as factory involvement will happen only after the main MultiTenant component is registered to configuration and ready to use.

Unfortunately, it is not possible to write a test as component is created inside factory method, therefore it is not mockable. Also none of produce components exposes something like isStarted() method where we could check if start was invoked.

Passed manual testing.

sonarcloud[bot] commented 7 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 1 Code Smell

100.0% 100.0% Coverage
0.0% 0.0% Duplication