Mediarq.HealthChecks
1.5.1
dotnet add package Mediarq.HealthChecks --version 1.5.1
NuGet\Install-Package Mediarq.HealthChecks -Version 1.5.1
<PackageReference Include="Mediarq.HealthChecks" Version="1.5.1" />
<PackageVersion Include="Mediarq.HealthChecks" Version="1.5.1" />
<PackageReference Include="Mediarq.HealthChecks" />
paket add Mediarq.HealthChecks --version 1.5.1
#r "nuget: Mediarq.HealthChecks, 1.5.1"
#:package Mediarq.HealthChecks@1.5.1
#addin nuget:?package=Mediarq.HealthChecks&version=1.5.1
#tool nuget:?package=Mediarq.HealthChecks&version=1.5.1
Mediarq.HealthChecks
Catches a missing or ambiguous handler before it becomes a HandlerNotFoundException at the first
dispatch in production: an IHealthCheck for your /health endpoint, plus an optional check that runs
once at host startup and fails the app fast.
dotnet add package Mediarq.HealthChecks
Usage
builder.Services.AddHealthChecks()
.AddMediarqHandlerRegistrationCheck(assemblies: typeof(Program).Assembly);
Exposes it the usual way:
app.MapHealthChecks("/health");
Healthy when every ICommand/IQuery closed type discovered in assemblies resolves to exactly one
registered IRequestHandler<TRequest, TResponse>; otherwise Unhealthy, with the offending types and
their handler counts (0 = missing, 2+ = ambiguous) in the result's Data.
Fail fast at startup
builder.Services.AddMediarqHandlerValidationOnStartup(typeof(Program).Assembly);
Runs the same check once, synchronously, as part of host startup — a misconfiguration throws
InvalidOperationException and the app never starts accepting traffic, instead of surfacing on whichever
request happens to hit the broken handler first.
assemblies defaults to the entry assembly when omitted; pass every assembly that declares
commands/queries or handlers explicitly in a modular app.
Learn more
Wiring extensions · Full README
MIT © Nicolas Rouffart
| 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 is compatible. 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. 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
- Mediarq.Core (>= 1.5.1)
- Microsoft.Extensions.Diagnostics.HealthChecks (>= 8.0.10)
- Microsoft.Extensions.Hosting.Abstractions (>= 8.0.1)
-
net8.0
- Mediarq.Core (>= 1.5.1)
- Microsoft.Extensions.Diagnostics.HealthChecks (>= 8.0.10)
- Microsoft.Extensions.Hosting.Abstractions (>= 8.0.1)
-
net9.0
- Mediarq.Core (>= 1.5.1)
- Microsoft.Extensions.Diagnostics.HealthChecks (>= 8.0.10)
- Microsoft.Extensions.Hosting.Abstractions (>= 8.0.1)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Mediarq.HealthChecks:
| Package | Downloads |
|---|---|
|
Mediarq.Aspire
.NET Aspire ServiceDefaults integration for Mediarq: one call from your project's own ServiceDefaults Extensions.cs wires Mediarq's OpenTelemetry instrumentation and the handler-registration health check into the Aspire dashboard. |
GitHub repositories
This package is not used by any popular GitHub repositories.