Package io.axoniq.framework.messaging.multitenancy.api
@NullMarked
package io.axoniq.framework.messaging.multitenancy.api
Contains the multi-tenancy API, like the tenant descriptor, tenant provider, and tenant resolution contracts.
-
ClassDescriptionA
MessageDispatchInterceptorthat attaches the tenant of the dispatchingProcessingContextonto a dispatched command or query, so it stays attributable to that tenant once it crosses a distributed command or query bus and arrives in a freshProcessingContexton the receiving side.ATenantResolverimplementation that resolves the target tenant from, and attaches it back to, message metadata.AxoniqAddonimplementation for the Axoniq Framework Multi-tenancy.Interface for components that can be registered with aTenantProvider.AMessageHandlerInterceptorthat registers theTenantDescriptorof the handledMessagein theProcessingContext, so components further down the handling chain route to that tenant without inspecting the message again.Creates and destroys the per-tenant instances held by aTenantComponentProvider.Provides the per-tenant instance of a single application component of typeT.Predicate that during runtime determines whether a newly registeredtenantshould be added to the tenant-aware infrastructure components.A descriptor for tenants holding thetenantIdand aMapof provider specific properties that can be used for tenant resolution.Interface for components that can provide a list of tenant descriptors.Exception thrown when no tenant can be established for a message or an operation.Contract towards a component that provisions the registered set oftenantsandMultiTenantAwareComponents.Decides which tenant an operation is routed to, wrapping aTenantResolverto resolve aMessage(or theProcessingContextcarrying it) to one of the known tenants, and yielding anOptionalinstead of throwing when no known tenant matches.A cache of one infrastructure component per tenant that creates each component lazily on first use and evicts it when its tenant is removed.