Table of Contents

Class TenantContextOptions

Namespace
Excalibur.Dispatch
Assembly
Excalibur.Dispatch.Abstractions.dll

Configures how the tenancy pipeline behaves when no tenant resolves for a message or request.

public sealed class TenantContextOptions
Inheritance
TenantContextOptions
Inherited Members
Extension Methods

Remarks

This is the explicit fail-fast-versus-default knob for ambient tenancy. When RequireTenant is enabled and no tenant resolves on a tenant-required path, the resolver pipeline fails fast (mirroring the storage-side Excalibur.Data.Sharding.TenantShardNotFoundException) rather than proceeding with an unscoped operation. DefaultTenantId is the opt-in fallback applied when a tenant is not otherwise resolved.

Properties

DefaultTenantId

Gets or sets the explicit default tenant identifier applied when no tenant is otherwise resolved.

public string? DefaultTenantId { get; set; }

Property Value

string

The fallback tenant identifier, or null when no default is configured.

RequireTenant

Gets or sets a value indicating whether a resolved tenant is mandatory.

public bool RequireTenant { get; set; }

Property Value

bool

true to fail fast when no tenant resolves on a tenant-required path; false (the default) to allow unscoped operation.