Franz.Common.Messaging.Hosting.Azure
1.7.3
dotnet add package Franz.Common.Messaging.Hosting.Azure --version 1.7.3
NuGet\Install-Package Franz.Common.Messaging.Hosting.Azure -Version 1.7.3
<PackageReference Include="Franz.Common.Messaging.Hosting.Azure" Version="1.7.3" />
<PackageVersion Include="Franz.Common.Messaging.Hosting.Azure" Version="1.7.3" />
<PackageReference Include="Franz.Common.Messaging.Hosting.Azure" />
paket add Franz.Common.Messaging.Hosting.Azure --version 1.7.3
#r "nuget: Franz.Common.Messaging.Hosting.Azure, 1.7.3"
#:package Franz.Common.Messaging.Hosting.Azure@1.7.3
#addin nuget:?package=Franz.Common.Messaging.Hosting.Azure&version=1.7.3
#tool nuget:?package=Franz.Common.Messaging.Hosting.Azure&version=1.7.3
Franz.Common.Messaging.Hosting.Azure
Franz.Common.Messaging.Hosting.Azure is the Azure hosting orchestration layer for the Franz Framework messaging stack.
It provides an opinionated, batteries-included runtime that wires Azure messaging transports into the .NET Generic Host, while preserving Franzβs core principles:
- transport purity
- mediator-driven execution
- explicit lifecycle management
- extensibility through composition
This package does not implement messaging transports. It orchestrates them.
π― Purpose
This package answers one simple question:
βI want to run Franz messaging on Azure β just make it work.β
It does so by:
- starting and stopping Azure background consumers
- mapping HTTP endpoints for Azure Event Grid
- reusing the core Franz hosting abstractions
- leaving transport adapters fully reusable and hosting-agnostic
π§© What This Package Orchestrates
Franz.Common.Messaging.Hosting.Azure coordinates the following transport adapters:
Azure Service Bus
Franz.Common.Messaging.AzureEventBusAzure Event Hubs (streaming)
Franz.Common.Messaging.AzureEventHubsAzure Event Grid (HTTP ingress)
Franz.Common.Messaging.AzureEventGrid
Each transport remains independently usable outside of this hosting package.
β¨ Features
π¦ Azure-Native Hosting
- Uses .NET Generic Host
- Registers background listeners as
IHostedService - Clean startup / shutdown semantics
- No custom loops or hidden threads
π§ Franz Hosting Abstractions Reused
Builds on Franz.Common.Messaging.Hosting
Reuses:
- hosting lifecycle conventions
- Outbox / Inbox listeners
- mediator dispatch semantics
No duplication of hosting logic
π Event Grid HTTP Ingress
- Maps Azure Event Grid to HTTP endpoints
- Minimal APIβfriendly
- Supports subscription validation
- Dispatches events through Franz mediator
π Transport-Pure Design
- No Azure SDK usage at the business layer
- No transport logic duplicated
- Hosting and transport concerns remain strictly separated
π¦ Dependencies
This package depends on:
Franz packages
Franz.Common.Messaging.Hosting
Franz.Common.Messaging.AzureEventBus
Franz.Common.Messaging.AzureEventHubs
Franz.Common.Messaging.AzureEventGrid
Franz.Common.Logging
Franz.Common.Errors
.NET / ASP.NET
Microsoft.Extensions.Hosting
Microsoft.Extensions.DependencyInjection
Microsoft.Extensions.Logging
Microsoft.AspNetCore.Http.Abstractions
β No business dependencies β No direct Azure SDK usage (delegated to transport packages)
π Project Structure
Franz.Common.Messaging.Hosting.Azure/
βββ DependencyInjection/
β βββ ServiceCollectionExtensions.cs
β
βββ EventBus/
β βββ AzureEventBusHostedService.cs
β
βββ EventHubs/
β βββ AzureEventHubsHostedService.cs
β
βββ EventGrid/
β βββ AzureEventGridEndpointOptions.cs
β βββ EndpointRouteBuilderExtensions.cs
β
βββ README.md
βοΈ Registration
Service registration
builder.Services.AddFranzAzureHosting(options =>
{
options.EventBus = bus =>
{
bus.ConnectionString = configuration["Azure:ServiceBus"]!;
bus.EntityName = "franz-events";
};
options.EventHubs = hubs =>
{
hubs.ConnectionString = configuration["Azure:EventHubs"]!;
hubs.EventHubName = "orders-stream";
hubs.ConsumerGroup = "$Default";
hubs.BlobConnectionString = configuration["Azure:Storage"]!;
hubs.BlobContainerName = "eventhub-checkpoints";
};
options.EventGrid = grid =>
{
grid.Route = "/events/eventgrid";
};
});
Event Grid endpoint mapping
app.MapFranzAzureEventGrid();
Or with customization:
app.MapFranzAzureEventGrid(options =>
{
options.Route = "/integrations/azure/eventgrid";
});
π Runtime Behavior
Background listeners
On application startup:
- Azure Service Bus processor starts
- Azure Event Hubs processor starts
- Franz Outbox listeners (if registered) start
On shutdown:
- Processors are stopped gracefully
- In-flight messages are completed or retried by Azure
Event Grid ingress
- Azure Event Grid posts events to HTTP endpoint
- Subscription validation handled automatically
- Events mapped to Franz
Message - Dispatched through Franz mediator pipelines
π§ Design Philosophy
This package is opinionated but optional.
You may choose to:
- use this hosting package for rapid Azure adoption
- host Azure transports manually in custom runtimes
- embed Franz messaging in Azure Functions or workers
The transport packages remain fully reusable without this hosting layer.
Hosting.Azure orchestrates β transports integrate.
π Extensibility
This package is designed to evolve:
- Additional Azure transports can be added
- Hosting behavior can be overridden
- Event Grid routing can be customized
- Outbox / Inbox listeners remain transport-agnostic
π Version Information
- Current Version: 1.7.3
- Target Framework: .NET 10
- Part of the Franz Framework
π License
MIT License β see LICENSE.
β Status
This package completes the Azure runtime layer for the Franz messaging ecosystem.
Together with:
AzureEventBusAzureEventHubsAzureEventGrid
it provides a full, production-ready Azure messaging stack with clean separation of concerns and long-term extensibility.
| 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.Errors (>= 1.7.3)
- Franz.Common.Logging (>= 1.7.3)
- Franz.Common.Messaging.AzureEventBus (>= 1.7.3)
- Franz.Common.Messaging.AzureEventGrid (>= 1.7.3)
- Franz.Common.Messaging.AzureEventHubs (>= 1.7.3)
- Franz.Common.Messaging.Hosting (>= 1.7.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.