Franz.Common.Messaging.Hosting
1.2.62
dotnet add package Franz.Common.Messaging.Hosting --version 1.2.62
NuGet\Install-Package Franz.Common.Messaging.Hosting -Version 1.2.62
<PackageReference Include="Franz.Common.Messaging.Hosting" Version="1.2.62" />
paket add Franz.Common.Messaging.Hosting --version 1.2.62
#r "nuget: Franz.Common.Messaging.Hosting, 1.2.62"
// Install Franz.Common.Messaging.Hosting as a Cake Addin #addin nuget:?package=Franz.Common.Messaging.Hosting&version=1.2.62 // Install Franz.Common.Messaging.Hosting as a Cake Tool #tool nuget:?package=Franz.Common.Messaging.Hosting&version=1.2.62
Franz.Common.Messaging.Hosting
A foundational library within the Franz Framework designed to enable and manage hosted messaging services in distributed applications. This package provides utilities for message execution strategies, delegation, transaction management, and seamless integration with Microsoft.Extensions.Hosting.
Features
- Hosted Messaging Services:
MessagingHostedService
for managing message processing as a hosted background service.
- Message Context Management:
MessageContextAccessor
for handling message-specific contexts during execution.
- Delegating Message Actions:
- Interfaces and classes such as
IAsyncMessageActionFilter
andMessageActionExecutionDelegate
for extending and controlling the message processing pipeline.
- Interfaces and classes such as
- Transaction Management:
TransactionFilter
ensures consistency in messaging transactions.
- Messaging Execution Strategies:
IMessagingStrategyExecuter
to define and execute custom strategies for message processing.
- Extensions:
HostBuilderExtensions
for integrating messaging services with the application host builder.
Version Information
- Current Version: 1.2.62
- Part of the private Franz Framework ecosystem.
Dependencies
This package relies on:
- Microsoft.Extensions.DependencyInjection.Abstractions (8.0.0): Simplifies dependency injection configurations.
- Microsoft.Extensions.Hosting (8.0.0): Provides hosting abstractions for background services.
- Franz.Common.Hosting: Provides general hosting utilities.
- Franz.Common.Logging: Enables centralized logging for hosted messaging.
- Franz.Common.Messaging: Core messaging utilities and abstractions.
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.Hosting --version 1.2.62
Usage
1. Register Messaging Hosted Services
Use HostBuilderExtensions
to add hosted messaging services:
using Franz.Common.Messaging.Hosting.Extensions;
var host = Host.CreateDefaultBuilder(args)
.AddMessagingHostedService()
.Build();
await host.RunAsync();
2. Customize Messaging Actions
Extend and control message processing pipelines using IAsyncMessageActionFilter
:
using Franz.Common.Messaging.Hosting.Delegating;
public class CustomMessageActionFilter : IAsyncMessageActionFilter
{
public async Task OnMessageExecutingAsync(MessageActionExecutingContext context)
{
// Add custom logic before message processing
}
public async Task OnMessageExecutedAsync(MessageActionExecutedContext context)
{
// Add custom logic after message processing
}
}
3. Transaction Management
Ensure transactional consistency using the TransactionFilter
:
using Franz.Common.Messaging.Hosting.Transactions;
services.AddControllers(options =>
{
options.Filters.Add<TransactionFilter>();
});
4. Implement Messaging Strategies
Define custom strategies for message execution using IMessagingStrategyExecuter
:
using Franz.Common.Messaging.Hosting.Executing;
public class CustomMessagingStrategyExecuter : IMessagingStrategyExecuter
{
public async Task ExecuteAsync(MessageContext context)
{
// Custom message execution logic
}
}
Integration with Franz Framework
The Franz.Common.Messaging.Hosting package integrates seamlessly with:
- Franz.Common.Hosting: General hosting utilities for ASP.NET Core applications.
- Franz.Common.Logging: Provides centralized logging for hosted services.
- Franz.Common.Messaging: Core messaging utilities for distributed systems.
Ensure these dependencies are installed to leverage the package's full potential.
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.
- 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.62
- Added
MessagingHostedService
for background messaging processing. - Introduced
IAsyncMessageActionFilter
andMessageActionExecutionDelegate
for extending messaging pipelines. - Integrated
TransactionFilter
for transactional consistency. - Full compatibility with Franz.Common.Hosting, Franz.Common.Logging, and Franz.Common.Messaging.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. |
-
net8.0
- Franz.Common.Hosting (>= 1.2.62)
- Franz.Common.Logging (>= 1.2.62)
- Franz.Common.Messaging (>= 1.2.62)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0.0)
- Microsoft.Extensions.Hosting (>= 8.0.0)
NuGet packages (4)
Showing the top 4 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.Hosting.MediatR
Shared utility library for the Franz Framework. |
|
Franz.Common.Messaging.EntityFramework
Shared utility library for the Franz Framework. |
|
Franz.Common.Messaging.Bootstrap
Shared utility library for the Franz Framework. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.2.62 | 80 | 1/8/2025 |