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
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Franz.Common.Messaging.Hosting" Version="3.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Franz.Common.Messaging.Hosting" Version="3.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Franz.Common.Messaging.Hosting" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Franz.Common.Messaging.Hosting --version 3.0.0
                    
#r "nuget: Franz.Common.Messaging.Hosting, 3.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Franz.Common.Messaging.Hosting@3.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Franz.Common.Messaging.Hosting&version=3.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Franz.Common.Messaging.Hosting&version=3.0.0
                    
Install as a Cake Tool

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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
Loading failed