Class AxonServerMultiTenancyConfigurationDefaults

java.lang.Object
io.axoniq.framework.messaging.multitenancy.axonserver.configuration.AxonServerMultiTenancyConfigurationDefaults
All Implemented Interfaces:
ConfigurationEnhancer

@Internal @RegistrationScope(scope=CURRENT) public class AxonServerMultiTenancyConfigurationDefaults extends Object implements ConfigurationEnhancer
ConfigurationEnhancer registering the default Axon Server-backed multi-tenancy components: It also disables the SnapshotSourcingConfigurationEnhancer, since snapshot sourcing is composed per tenant by the routing engine rather than once for the application.

Contributed through the ServiceLoader, so multi-tenancy is active as soon as the axoniq-multi-tenancy module is on the classpath. Use MultiTenancyUtils.disable(ComponentRegistry) to opt out, for instance when running against an infrastructure without Axon Server.

Since:
5.3.0
Author:
Jan Galinski, Laura Devriendt, Jakob Hatzl
  • Field Details

    • ENHANCER_ORDER

      public static final int ENHANCER_ORDER
      The order of this enhancer compared to others.

      Runs early, so the Axon Server-backed multi-tenancy defaults registered here are in place before other enhancers and user registrations that build on them, most notably before Axon Server's own AxonServerConfigurationEnhancer registers its non-multi-tenant defaults for the same component types.

      Expressed relative to MultiTenancyConfigurationDefaults.ENHANCER_ORDER, which anchors the multi-tenancy enhancer block, so this enhancer can never end up ahead of the generic defaults it builds on.

      See Also:
  • Constructor Details

    • AxonServerMultiTenancyConfigurationDefaults

      public AxonServerMultiTenancyConfigurationDefaults()
  • Method Details