Resiliency¶
Baseline resiliency is inherited from the Base Template. Tenants-specific considerations:
Lifecycle integrity¶
Lifecycle transitions are constrained by AllowedTransitions on TenantLifecycleStatusEnumeration and enforced in DefaultTenantsProcessor; illegal transitions throw TenantStatusTransitionNotAllowedException rather than corrupting state.
Write serialization¶
TenantLifecycleGrain (keyed by tenant partition id) serializes writes per partition and validates the grain key against the operation's TenantId, preventing cross-partition mutations.
Event publication¶
Lifecycle events are published through MassTransit; on the in-memory transport path an outbox keeps publication consistent with the write. Downstream contexts (Entitlements, Billing, Metering) depend on these events, so make sure transport/persistence are durable in production (MassTransit:TransportType/PersistenceType).