Tenantry ProAPI reference
MassTransitProBuilderExtensions class
Namespace: Tenantry.Pro.MassTransit.Extensions · Package: Tenantry.Pro.MassTransit · API reference
Extension methods for registering MassTransit tenant-propagation services on ProBuilder<TKey>.
public static class MassTransitProBuilderExtensionsMethods
AddMassTransitTenantFilters<TKey>(ProBuilder<TKey>, Action<TenantPropagationOptions>?)
Registers the MassTransit tenant-propagation filters as singletons in DI. After registration, call cfg.UseTenantryPro(ctx) (or the generic overload) inside your AddMassTransit bus factory configuration to wire the filters into the pipeline.
public static ProBuilder<TKey> AddMassTransitTenantFilters<TKey>(this ProBuilder<TKey> builder, Action<TenantPropagationOptions>? configure = null) where TKey : IEquatable<TKey>, IParsable<TKey>Type parameters:
TKey: The tenant identifier type.
Parameters:
builderProBuilder<TKey>: The Pro builder.configureAction<TenantPropagationOptions>: Optional configuration of the tenant-propagation policy — in particularTenantPropagationOptions.OnMissingTenant, which controls what happens to a consumed message that has no resolvable tenant. Defaults toWarn.
Returns: ProBuilder<TKey>: The same builder for chaining.