Franz.Common.Messaging.Hosting
3.0.0
dotnet add package Franz.Common.Messaging.Hosting --version 3.0.0
NuGet\Install-Package Franz.Common.Messaging.Hosting -Version 3.0.0
<PackageReference Include="Franz.Common.Messaging.Hosting" Version="3.0.0" />
<PackageVersion Include="Franz.Common.Messaging.Hosting" Version="3.0.0" />
<PackageReference Include="Franz.Common.Messaging.Hosting" />
paket add Franz.Common.Messaging.Hosting --version 3.0.0
#r "nuget: Franz.Common.Messaging.Hosting, 3.0.0"
#:package Franz.Common.Messaging.Hosting@3.0.0
#addin nuget:?package=Franz.Common.Messaging.Hosting&version=3.0.0
#tool nuget:?package=Franz.Common.Messaging.Hosting&version=3.0.0
Franz.Common.Messaging.Hosting
Generic host integration for Franz message listeners and message execution scopes.
Overview
This package contains the generic MessagingHostedService, the UseMessaging host-builder extensions, message-context handling, and the outbox listener implementation. Transport-specific hosted services should generally be registered through their corresponding hosting packages.
Installation
dotnet add package Franz.Common.Messaging.Hosting
Host composition
The package exposes two UseMessaging overloads:
hostBuilder.UseMessaging(
configure: (services, configuration) =>
{
// Register the selected transport and application handlers.
},
assembly: typeof(Program).Assembly);
The generic Startup overload expects a startup type with a constructor accepting IHostEnvironment and IConfiguration, plus a ConfigureServices(IServiceCollection) method:
hostBuilder.UseMessaging<MessagingStartup>(typeof(Program).Assembly);
Both overloads scan the application base directory for DLL names matching the entry assembly's product prefix, load matching assemblies that are not already loaded, configure logging, and register MessagingHostedService.
Listener lifecycle constraint
MessagingHostedService.StartAsync awaits IListener.Listen(cancellationToken). Therefore, the listener must return after its startup/registration phase. A listener whose Listen method runs a polling or consumption loop until cancellation will block generic-host startup when used with this service.
For the supported Kafka and RabbitMQ background-consumer lifecycles, prefer Franz.Common.Messaging.Hosting.Kafka or Franz.Common.Messaging.Hosting.RabbitMQ; those packages use BackgroundService and keep the long-running listener attached to the host's execution lifecycle.
Message execution
The hosted service creates a DI scope per delivered message, establishes message context, optionally initializes validated tenant execution context, resolves an IMessagingStrategyExecuter, and executes the selected strategy. The scope is disposed after processing.
License
MIT. See the repository LICENSE.
| 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.Hosting (>= 3.0.0)
- Franz.Common.Logging (>= 3.0.0)
- Franz.Common.Messaging (>= 3.0.0)
- Franz.Common.Messaging.MultiTenancy (>= 3.0.0)
- Franz.Common.Serialization (>= 3.0.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.14)
- Microsoft.Extensions.Hosting (>= 10.0.14)
- SharpCompress (>= 0.50.7)
- Snappier (>= 1.3.1)
NuGet packages (9)
Showing the top 5 NuGet packages that depend on Franz.Common.Messaging.Hosting:
| Package | Downloads |
|---|---|
|
Franz.Common.Messaging.Kafka
Shared utility library for the Franz Framework. |
|
|
Franz.Common.Messaging.Bootstrap
Shared utility library for the Franz Framework. |
|
|
Franz.Common.Messaging.EntityFramework
Shared utility library for the Franz Framework. |
|
|
Franz.Common.Messaging.Hosting.Mediator
Shared utility library for the Franz Framework. |
|
|
Franz.Common.Messaging.RabbitMQ
Shared utility library for the Franz Framework. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 3.0.0 | 0 | 11/10/2026 |
| 2.3.4 | 430 | 11/1/2026 |
| 2.3.3 | 397 | 10/28/2026 |
| 2.3.2 | 196 | 10/27/2026 |
| 2.3.1 | 251 | 10/26/2026 |
| 2.3.0 | 335 | 7/21/2026 |
| 2.2.19 | 237 | 7/19/2026 |
| 2.2.18 | 232 | 7/19/2026 |
| 2.2.17 | 232 | 7/12/2026 |
| 2.2.16 | 234 | 7/2/2026 |
| 2.2.15 | 233 | 6/29/2026 |
| 2.2.14 | 232 | 6/29/2026 |
| 2.2.13 | 237 | 6/29/2026 |
| 2.2.12 | 230 | 6/28/2026 |
| 2.2.11 | 232 | 6/28/2026 |
| 2.2.10 | 239 | 6/28/2026 |
| 2.2.9 | 239 | 6/28/2026 |
| 2.2.8 | 228 | 6/28/2026 |
| 2.2.7 | 233 | 6/7/2026 |
| 2.2.6 | 245 | 6/6/2026 |