Franz.Common.Messaging.Hosting.Azure 3.0.0

dotnet add package Franz.Common.Messaging.Hosting.Azure --version 3.0.0
                    
NuGet\Install-Package Franz.Common.Messaging.Hosting.Azure -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.Azure" 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.Azure" Version="3.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Franz.Common.Messaging.Hosting.Azure" />
                    
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.Azure --version 3.0.0
                    
#r "nuget: Franz.Common.Messaging.Hosting.Azure, 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.Azure@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.Azure&version=3.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Franz.Common.Messaging.Hosting.Azure&version=3.0.0
                    
Install as a Cake Tool

Franz.Common.Messaging.Hosting.Azure

Azure transport composition and hosted-service integration for Service Bus and Event Hubs, plus Event Grid endpoint mapping.

Overview

This package provides AddFranzAzureHosting(...) to compose Azure Service Bus, Event Hubs, and Event Grid services, and MapFranzAzureEventGrid(...) to map an HTTP ingress endpoint.

Installation

dotnet add package Franz.Common.Messaging.Hosting.Azure

Azure hosting registration

using Franz.Common.Messaging.Hosting.Azure.DependencyInjection;

builder.Services.AddFranzAzureHosting(options =>
{
    options.EventBus = bus =>
    {
        bus.ConnectionString = builder.Configuration["AzureServiceBus:ConnectionString"]!;
        bus.EntityName = "orders";
    };

    options.EventHubs = hubs =>
    {
        hubs.ConnectionString = builder.Configuration["EventHubs:ConnectionString"]!;
        hubs.EventHubName = "orders";
        hubs.ConsumerGroup = "$Default";
        hubs.BlobConnectionString = builder.Configuration["EventHubs:BlobConnectionString"]!;
        hubs.BlobContainerName = "eventhub-checkpoints";
    };
});

The Event Bus and Event Hubs callbacks are forwarded to their transport registration methods. The EventGrid callback on FranzAzureHostingOptions is currently not consumed by AddFranzAzureHosting; configure the HTTP route directly when mapping the endpoint.

Event Grid endpoint mapping

using Franz.Common.Messaging.Hosting.Azure.EventGrid;

app.MapFranzAzureEventGrid(options =>
{
    options.Route = "/events/eventgrid";
});

The endpoint accepts an Event Grid event batch, passes each event and the request cancellation token to IAzureEventGridIngress, and returns an empty 200 OK.

Subscription validation is not complete in the current endpoint. The ingress returns a SubscriptionValidationResult, but the endpoint discards it. Azure Event Grid requires the response body to contain validationResponse; use a custom endpoint for subscription creation until this is corrected.

Composition and lifetime limitations

The current AddFranzAzureEventBus transport registration already adds AzureEventBusHostedService. AddFranzAzureHosting also adds that hosted service after calling the transport registration, resulting in duplicate Event Bus hosted-service registrations. Direct transport registration also registers the hosted service and should not be combined with the wrapper.

The Event Bus and Event Hubs processors are registered as singletons while capturing IDispatcher, which Franz Mediator registers as scoped. The Event Grid ingress is also registered as a singleton and captures the scoped dispatcher. These registrations fail when DI scope validation is enabled and retain root-scoped dispatchers when validation is disabled. The Event Bus and Event Hubs processors resolve a scoped dispatcher from each message/event scope only when the tenant message initializer is present. Treat these Azure processor/ingress paths as requiring source-level lifetime correction before production use.

  • Franz.Common.Messaging.AzureEventBus
  • Franz.Common.Messaging.AzureEventHubs
  • Franz.Common.Messaging.AzureEventGrid

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

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
3.0.0 81 11/10/2026
2.3.4 345 11/1/2026
2.3.3 110 10/28/2026
2.3.2 105 10/27/2026
2.3.1 100 10/26/2026
2.3.0 151 7/21/2026
2.2.19 138 7/19/2026
2.2.18 141 7/19/2026
2.2.17 136 7/12/2026
2.2.16 130 7/2/2026
2.2.15 145 6/29/2026
2.2.14 131 6/29/2026
2.2.13 139 6/29/2026
2.2.12 129 6/28/2026
2.2.11 124 6/28/2026
2.2.10 134 6/28/2026
2.2.9 140 6/28/2026
2.2.8 131 6/28/2026
2.2.7 143 6/7/2026
2.2.6 135 6/6/2026
Loading failed