NServiceBusContrib.HealthCheck 1.0.0

dotnet add package NServiceBusContrib.HealthCheck --version 1.0.0
                    
NuGet\Install-Package NServiceBusContrib.HealthCheck -Version 1.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="NServiceBusContrib.HealthCheck" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="NServiceBusContrib.HealthCheck" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="NServiceBusContrib.HealthCheck" />
                    
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 NServiceBusContrib.HealthCheck --version 1.0.0
                    
#r "nuget: NServiceBusContrib.HealthCheck, 1.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 NServiceBusContrib.HealthCheck@1.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=NServiceBusContrib.HealthCheck&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=NServiceBusContrib.HealthCheck&version=1.0.0
                    
Install as a Cake Tool

NServiceBusContrib.HealthCheck

Aggregates the readiness of every NServiceBus endpoint in the process into a single ASP.NET Core health check, suitable for a container /health endpoint. A process may host multiple endpoints (NServiceBus 10.2+); if one faults while the others keep running, the health check reports unhealthy.

builder.Services
    .AddHealthChecks()
    .AddNServiceBus();

// map it the standard way
app.MapHealthChecks("/health");
  • Healthy: every endpoint has completed warm-up and (where heartbeat liveness is enabled) has a fresh heartbeat.
  • Unhealthy: at least one endpoint is still starting, has stopped, or its heartbeat has gone stale.

Readiness is driven by NServiceBusContrib.WarmUp, so enable warm-up on each endpoint you want reflected (endpointConfiguration.WarmUp(...)).

Readiness + liveness (Docker / Kubernetes)

A warming-up endpoint is alive but not ready. Register the two probes and map them to separate URLs so a liveness probe doesn't restart the app during warm-up:

builder.Services
    .AddHealthChecks()
    .AddNServiceBusReadiness()   // tag: "ready"
    .AddNServiceBusLiveness();   // tag: "live"

app.MapHealthChecks("/health/ready", new() { Predicate = r => r.Tags.Contains("ready") });
app.MapHealthChecks("/health/live",  new() { Predicate = r => r.Tags.Contains("live")  });
Endpoint state /health/ready /health/live
Starting Unhealthy Healthy
Ready (fresh) Healthy Healthy
Stopped / stale heartbeat Unhealthy Unhealthy

Kubernetes: point startupProbe + readinessProbe at /health/ready and livenessProbe at /health/live. Docker: one HEALTHCHECK --start-period=... at /health/ready (or /health); Docker's starting state comes from the start period. See docs/healthcheck.md for full probe examples.

Heartbeat liveness (optional)

Detect a stalled or dead message pump, not just an orderly shutdown. Configured per endpoint (the mirror of WarmUp(...)): instrument the endpoint here, then expose it with AddNServiceBusLiveness().

endpointConfiguration.EnableLivenessHeartbeat(heartbeat =>
{
    heartbeat.Interval(TimeSpan.FromSeconds(15));
    heartbeat.StaleAfter(TimeSpan.FromMinutes(1));   // defaults to 3 * interval
});

The endpoint periodically sends a heartbeat to its own queue; processing it keeps the endpoint live. If the pump stops processing, the heartbeat goes stale and the liveness check reports the endpoint unhealthy.

Heartbeats are automatically excluded from auditing, so they never reach the audit queue even when AuditProcessedMessagesTo(...) is enabled.

Logging

Health transitions are logged (deduped): a warning when an endpoint becomes unhealthy (stopped or heartbeat stale) and information when it recovers. This is on by default and logged when a health check runs (on a probe). To log transitions even without probes, add the optional background monitor:

builder.Services.AddNServiceBusHealthMonitor();   // polls every 30s (configurable)
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
1.0.0 134 7/11/2026
1.0.0-alpha.4 92 7/3/2026
1.0.0-alpha.3 72 7/3/2026
1.0.0-alpha.2 69 7/3/2026
1.0.0-alpha.1 78 7/3/2026