Skip to content
Mark Lauter edited this page Jun 25, 2026 · 10 revisions

Plumber MSL Armory

Plumber

Another weapon from the MSL Armory

Middleware pipelines for host-free .NET projects. Plumber brings the ASP.NET Core middleware model — a request, a response, and a chain of steps with dependency injection and configuration — to .NET projects that run without a host: console apps, AWS Lambdas, Azure Functions, queue consumers, file processors, and similar workloads.

dotnet add package MSL.Plumber.Pipeline
using Plumber;

using var handler = RequestHandlerBuilder
    .Create<string, string>()
    .Build();

handler.Use((context, next) =>
{
    context.Response = $"Hello, {context.Request}!";
    return next(context);
});

var greeting = await handler.InvokeAsync("World");
Console.WriteLine(greeting); // Hello, World!

Where to start

New to middleware pipelines? Start with the Concepts page — it explains the mental model from scratch, then walks through a realistic build in the Tutorial, and finishes with a guided tour of the Sample.Cli walkthrough.

Already familiar with the shape (ASP.NET Core middleware, MediatR, similar)? Jump into Building a Pipeline, then Middleware and Request Lifecycle.

Looking for a specific scenario? The Recipes section has full walkthroughs:

Migrating from an earlier version? See Migration. v5 adds two optional packages and makes no breaking changes. v4 changed configuration defaults and disposal, and v3 reshaped the public API around concrete types and explicit configuration. The page documents each change with before-and-after examples.

The Plumber packages

  • Pipeline (MSL.Plumber.Pipeline) — the core builder, handler, middleware, and request context.
  • Testing (MSL.Plumber.Pipeline.Testing) — PlumberApplicationFactory for exercising a real pipeline in tests.
  • Serilog Extensions (MSL.Plumber.Serilog.Extensions) — per-request Serilog request logging.
  • Diagnostics (MSL.Plumber.Diagnostics) — per-request OpenTelemetry tracing and metrics middleware.

Scope of this wiki

These pages document Plumber v5.x. The v2.x README is preserved on the v2.3.3 release tag for projects still on the v2 line.

Plumber targets .NET 10. The README in the repository root is the canonical short-form reference; this wiki expands on it with beginner content, recipes, and per-type API reference.

Clone this wiki locally