VOOZH about

URL: https://www.nuget.org/packages/Franz.Common.Mediator/

⇱ NuGet Gallery | Franz.Common.Mediator 2.2.7




Franz.Common.Mediator 2.2.7

dotnet add package Franz.Common.Mediator --version 2.2.7
 
 
NuGet\Install-Package Franz.Common.Mediator -Version 2.2.7
 
 
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.Mediator" Version="2.2.7" />
 
 
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Franz.Common.Mediator" Version="2.2.7" />
 
Directory.Packages.props
<PackageReference Include="Franz.Common.Mediator" />
 
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.Mediator --version 2.2.7
 
 
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Franz.Common.Mediator, 2.2.7"
 
 
#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.Mediator@2.2.7
 
 
#: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.Mediator&version=2.2.7
 
Install as a Cake Addin
#tool nuget:?package=Franz.Common.Mediator&version=2.2.7
 
Install as a Cake Tool
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

📦 Franz.Common.Mediator (v2.2.7)

A deterministic execution engine for application commands, queries, notifications, and events within the Franz Framework.

This mediator is designed as a structured execution pipeline runtime, not a simple in-process dispatcher.

It provides:

  • explicit handler execution
  • composable pipeline stages
  • deterministic cross-cutting behavior
  • clear separation between command/query/event execution flows

✨ Features

Core Dispatcher

  • IDispatcher as the single entry point for execution
  • Scoped execution model per request
  • Explicit handler resolution via DI

Handler Model

Supports:

  • ICommandHandler<TCommand, TResult>
  • IQueryHandler<TQuery, TResult>
  • INotificationHandler<TEvent>
  • IEventHandler<TEvent>
  • IStreamQueryHandler<TQuery, TStream>

Handlers are discovered via assembly scanning and registered automatically.


Pipeline Execution Engine

The mediator supports composable execution pipelines:

Command / Query Pipelines

  • IPipeline<TRequest, TResult>
  • Pre-processing + post-processing stages
  • Ordered execution chain

Event Pipelines

  • IEventPipeline<TEvent>
  • Dedicated event execution flow
  • Independent from command/query pipelines

Cross-Cutting Pipelines (Composable Modules)

Franz Mediator provides optional pipeline modules:

Observability

  • Logging pipelines
  • Serilog enrichment pipelines
  • Console observer (optional)

Validation

  • Request validation pipeline
  • Event validation pipeline
  • Pre-execution validation hooks

Resilience

  • Retry pipeline
  • Circuit breaker pipeline
  • Bulkhead isolation pipeline
  • Timeout pipeline

Transactional Control

  • Transaction pipeline for execution boundaries

🧭 Execution Model

The Franz Mediator follows a strict execution flow:

Dispatcher
 ↓
Pre-Pipeline Stages
 ↓
Handler Execution
 ↓
Post-Pipeline Stages
 ↓
Observers (optional)

For events:

Dispatcher
 ↓
Event Pre-Pipeline
 ↓
Event Handlers
 ↓
Event Post-Pipeline

📐 Design Principles

1. Deterministic Execution

Pipeline execution order is explicit and predictable.

2. Composable Behavior

Cross-cutting concerns are modular pipeline components.

3. No Hidden Magic

No implicit behavior chains outside registered pipelines.

4. Clear Execution Boundaries

Commands, queries, and events are distinct execution models.

5. DI-Native Design

All behavior is composed through IServiceCollection.


⚙️ Basic Usage

1️⃣ Register Mediator

services.AddFranzMediator(
 new[] { typeof(SomeHandler).Assembly });

2️⃣ Optional Default Setup (Recommended)

services.AddFranzMediatorDefault();

This includes:

  • dispatcher
  • handler scanning
  • logging pipeline
  • validation pipeline
  • audit pipeline
  • transaction pipeline (optional module set)

3️⃣ Sending Commands / Queries

var result = await dispatcher.Send(new CreateHeroCommand());

4️⃣ Publishing Notifications / Events

await dispatcher.Publish(new HeroCreatedEvent());

🧩 Pipeline Composition Model

Pipelines are additive and ordered via registration:

builder.Services.AddFranzSerilogAuditPipeline()
 .AddFranzEventValidationPipeline()
 .AddFranzSerilogLoggingPipeline()
 .AddFranzTelemetry(env, config);

Each pipeline is:

  • independently composable
  • scoped
  • executed in registration order

⚠️ Architectural Boundaries

This mediator:

DOES

  • execute in-process application logic
  • orchestrate pipelines
  • manage handler lifetimes
  • enforce execution policies

DOES NOT

  • handle transport (Kafka, RabbitMQ, HTTP)
  • manage background workers
  • perform hosting or runtime orchestration outside DI

📦 Versioning — v2.2.7

✨ Added

  • AddFranzMediatorDefault() as canonical setup method
  • clearer separation between command/query/event pipelines
  • improved event pipeline isolation model

🔧 Changed

  • pipeline system explicitly separated into command/query/event flows
  • improved DI scanning consistency for handlers
  • clarified execution model semantics

🧠 Architectural Clarification

  • Mediator = execution engine
  • Pipelines = behavior composition layer
  • Transport systems (Kafka, etc.) are external to this model

📄 License

MIT License


🧠 Final Note

Franz Mediator is designed around one principle:

Execution must be explicit, composable, and deterministic

It is not a request dispatcher with optional behaviors — it is a structured execution runtime for application logic.

Product Versions Compatible and additional computed target framework versions.
.NET net10.0 net10.0 is compatible.  net10.0-android net10.0-android was computed.  net10.0-browser net10.0-browser was computed.  net10.0-ios net10.0-ios was computed.  net10.0-maccatalyst net10.0-maccatalyst was computed.  net10.0-macos net10.0-macos was computed.  net10.0-tvos net10.0-tvos was computed.  net10.0-windows 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 (12)

Showing the top 5 NuGet packages that depend on Franz.Common.Mediator:

Package Downloads
Franz.Common.Business

Shared utility library for the Franz Framework.

Franz.Common.Bootstrap

Shared utility library for the Franz Framework.

Franz.Common.MongoDB

Shared utility library for the Franz Framework.

Franz.Common.Mediator.Polly

Shared utility library for the Franz Framework.

Franz.Common.Http.Refit

Shared utility library for the Franz Framework.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.2.7 512 6/7/2026
2.2.6 509 6/6/2026
2.2.5 550 6/4/2026
2.2.4 539 6/3/2026
2.2.3 525 6/2/2026
2.2.2 536 6/2/2026
2.2.1 547 5/24/2026
2.1.4 441 4/27/2026
2.1.3 422 4/26/2026
2.1.2 422 4/26/2026
2.1.1 426 4/22/2026
2.0.2 443 3/30/2026
2.0.1 435 3/29/2026
1.7.8 442 3/2/2026
1.7.7 470 1/31/2026
1.7.6 465 1/22/2026
1.7.5 437 1/10/2026
1.7.4 458 12/27/2025
1.7.3 524 12/22/2025
1.7.2 529 12/21/2025
Loading failed