Franz.Common.Messaging.MultiTenancy
2.3.3
dotnet add package Franz.Common.Messaging.MultiTenancy --version 2.3.3
NuGet\Install-Package Franz.Common.Messaging.MultiTenancy -Version 2.3.3
<PackageReference Include="Franz.Common.Messaging.MultiTenancy" Version="2.3.3" />
<PackageVersion Include="Franz.Common.Messaging.MultiTenancy" Version="2.3.3" />
<PackageReference Include="Franz.Common.Messaging.MultiTenancy" />
paket add Franz.Common.Messaging.MultiTenancy --version 2.3.3
#r "nuget: Franz.Common.Messaging.MultiTenancy, 2.3.3"
#:package Franz.Common.Messaging.MultiTenancy@2.3.3
#addin nuget:?package=Franz.Common.Messaging.MultiTenancy&version=2.3.3
#tool nuget:?package=Franz.Common.Messaging.MultiTenancy&version=2.3.3
Franz.Common.Messaging.MultiTenancy
Messaging and distributed integration for the Franz.Common framework on .NET 10.
Overview
The Franz.Common.Messaging.MultiTenancy package provides messaging and distributed integration within Franz.Common. It is designed to compose with the rest of the framework rather than imposing unrelated infrastructure choices on every application.
Installation
dotnet add package Franz.Common.Messaging.MultiTenancy
Design principles
- Explicit composition: register only the capabilities the application needs.
- Clear boundaries: keep domain and application contracts independent from provider-specific infrastructure where the package's role permits it.
- Predictable behavior: make configuration, failure modes, and lifecycle ownership visible rather than relying on hidden conventions.
- Operational readiness: validate security, resilience, diagnostics, and compatibility for the actual deployment environment.
Usage and configuration
Follow the package-specific setup, configuration, and code examples below. Only configure external services when this package requires them, and keep secrets outside source control.
Package-specific guide
A library within the Franz Framework that adds multi-tenancy support to messaging workflows. This package provides tools for managing tenant and domain-specific messaging contexts, enabling seamless integration of multi-tenancy in distributed systems.
Features
Tenant Context Management:
TenantContextAccessorfor handling tenant-specific data in messaging workflows.
Domain Context Management:
DomainContextAccessorfor managing domain-specific information during message processing.
Resolvers:
HeaderTenantResolverandHeaderDomainResolverfor resolving multi-tenancy metadata from message headers.MessagePropertyTenantResolverandMessagePropertyDomainResolverfor resolving multi-tenancy metadata from message properties.
Resolution Pipelines:
DefaultTenantResolutionPipelineandDefaultDomainResolutionPipelineto coordinate multiple resolvers in order.
Middleware:
TenantResolutionMiddlewareandDomainResolutionMiddlewarefor automatic resolution per message.
Service Registration:
ServiceCollectionExtensionsto simplify the setup of multi-tenancy messaging services.
Message Builders:
TenantMessageBuilderandDomainMessageBuilderfor constructing messages with tenant and domain data.
Version Information
- Current Version: v2.3.3
- Part of the private Franz Framework ecosystem.
Dependencies
This package relies on:
- Franz.Common.Messaging: Provides foundational messaging utilities and abstractions.
- Franz.Common.MultiTenancy: Core utilities for tenant and domain management.
Installation
From Private Azure Feed
Since this package is hosted privately, configure your NuGet client:
dotnet nuget add source "https://your-private-feed-url" \
--name "AzurePrivateFeed" \
--username "YourAzureUsername" \
--password "YourAzurePassword" \
--store-password-in-clear-text
Install the package:
dotnet add package Franz.Common.Messaging.MultiTenancy --Version 1.3.1
Usage
1. Register Multi-Tenancy Messaging Services
Use ServiceCollectionExtensions to register messaging multi-tenancy services:
using Franz.Common.Messaging.MultiTenancy.Extensions;
public class Startup
{
public void ConfigureServices(IServiceCollection services)
{
services.AddFranzMessagingMultiTenancy();
}
}
2. Access Tenant and Domain Contexts
Leverage TenantContextAccessor and DomainContextAccessor to retrieve tenant and domain-specific data:
using Franz.Common.Messaging.MultiTenancy;
public class TenantService
{
private readonly ITenantContextAccessor _tenantContextAccessor;
public TenantService(ITenantContextAccessor tenantContextAccessor)
{
_tenantContextAccessor = tenantContextAccessor;
}
public Guid? GetCurrentTenantId() => _tenantContextAccessor.GetCurrentTenantId();
}
using Franz.Common.Messaging.MultiTenancy;
public class DomainService
{
private readonly IDomainContextAccessor _domainContextAccessor;
public DomainService(IDomainContextAccessor domainContextAccessor)
{
_domainContextAccessor = domainContextAccessor;
}
public Guid? GetCurrentDomainId() => _domainContextAccessor.GetCurrentDomainId();
}
3. Automatic Tenant/Domain Resolution in Messaging Pipelines
Enable middleware to resolve tenant and domain per-message:
using Franz.Common.Messaging.MultiTenancy.Middleware;
public class MessagingPipeline
{
public void Configure(IMessagePipelineBuilder pipeline)
{
pipeline.Use<TenantResolutionMiddleware>();
pipeline.Use<DomainResolutionMiddleware>();
}
}
4. Build Tenant and Domain Messages
Use TenantMessageBuilder and DomainMessageBuilder to create tenant and domain-aware messages:
using Franz.Common.Messaging.MultiTenancy;
var tenantMessage = new TenantMessageBuilder()
.WithTenantId(Guid.NewGuid())
.Build();
var domainMessage = new DomainMessageBuilder()
.WithDomainId(Guid.NewGuid())
.Build();
Integration with Franz Framework
The Franz.Common.Messaging.MultiTenancy package integrates seamlessly with:
- Franz.Common.Messaging: Provides core messaging abstractions.
- Franz.Common.MultiTenancy: Extends tenant and domain management capabilities into messaging workflows.
- Franz.Common.Http.MultiTenancy: Aligns messaging and HTTP multi-tenancy under the same abstractions and contracts.
Contributing
This package is part of a private framework. Contributions are limited to the internal development team. If you have access, follow these steps:
- Clone the repository. @ https://github.com/bestacio89/Franz.Common/
- Create a feature branch.
- Submit a pull request for review.
License
This library is licensed under the MIT License. See the LICENSE file for more details.
Changelog
Version 1.2.65
- Added
TenantContextAccessorandDomainContextAccessorfor managing tenant and domain contexts. - Introduced
TenantMessageBuilderandDomainMessageBuilderfor constructing tenant and domain-aware messages. - Integrated
ServiceCollectionExtensionsfor streamlined multi-tenancy messaging setup.
Version 1.3
- Upgraded to .NET 9.0.8
- Added new features and improvements
- Separated business concepts from mediator concepts
- Now compatible with both the in-house mediator and MediatR
Version 1.3.1
Expanded messaging multi-tenancy abstractions to align with HTTP and core multi-tenancy:
- Added
HeaderTenantResolverandHeaderDomainResolver. - Added
MessagePropertyTenantResolverandMessagePropertyDomainResolver. - Introduced
DefaultTenantResolutionPipelineandDefaultDomainResolutionPipelineto orchestrate resolvers. - Added
TenantResolutionMiddlewareandDomainResolutionMiddlewarefor automatic resolution in messaging pipelines.
- Added
Enhanced
TenantContextAccessorandDomainContextAccessorto fully implement the updated core contracts (GetCurrentTenantId,SetCurrentTenantId, etc.).Extended
Messagewith aPropertiesdictionary for application-level metadata.Added
MessagePropertiesExtensionsfor strongly-typed property access.Improved service registration via
AddFranzMessagingMultiTenancy.
v2.0.1 – Internal Modernization
- Messaging and infrastructure refactored for async, thread-safety, and modern .NET 10 patterns.
- All APIs remain fully backward compatible.
- Tests, listeners, and pipeline components modernized.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Franz.Common.Headers (>= 2.3.3)
- Franz.Common.Messaging (>= 2.3.3)
- Franz.Common.MultiTenancy (>= 2.3.3)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Franz.Common.Messaging.MultiTenancy:
| Package | Downloads |
|---|---|
|
Franz.Common.Messaging.Bootstrap
Shared utility library for the Franz Framework. |
|
|
Franz.Common.Http.Messaging
Shared utility library for the Franz Framework. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.3.3 | 147 | 10/28/2026 |
| 2.3.2 | 80 | 10/27/2026 |
| 2.3.1 | 162 | 10/26/2026 |
| 2.3.0 | 186 | 7/21/2026 |
| 2.2.19 | 143 | 7/19/2026 |
| 2.2.18 | 149 | 7/19/2026 |
| 2.2.17 | 149 | 7/12/2026 |
| 2.2.16 | 246 | 7/2/2026 |
| 2.2.15 | 157 | 6/29/2026 |
| 2.2.14 | 147 | 6/29/2026 |
| 2.2.13 | 144 | 6/29/2026 |
| 2.2.12 | 144 | 6/28/2026 |
| 2.2.11 | 144 | 6/28/2026 |
| 2.2.10 | 147 | 6/28/2026 |
| 2.2.9 | 147 | 6/28/2026 |
| 2.2.8 | 152 | 6/28/2026 |
| 2.2.7 | 152 | 6/7/2026 |
| 2.2.6 | 150 | 6/6/2026 |
| 2.2.5 | 154 | 6/4/2026 |
| 2.2.4 | 145 | 6/3/2026 |