-
Notifications
You must be signed in to change notification settings - Fork 0
Home

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.Pipelineusing 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!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:
- AWS Lambda — API Gateway HTTP
- AWS Lambda — SQS event source
- Azure Functions — HTTP trigger
- SQS polling consumer (console)
- ASP.NET Core integration (host-mode)
- Generic Host BackgroundService worker
- Webhook receiver (minimal API)
- Multi-command CLI dispatcher
- File watcher / batch processor
- Configuration reload without a restart
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.
-
Pipeline (
MSL.Plumber.Pipeline) — the core builder, handler, middleware, and request context. -
Testing (
MSL.Plumber.Pipeline.Testing) —PlumberApplicationFactoryfor 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.
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.
Documents Plumber v4.x · Repository · MIT License · Report an issue
Getting Started
Pipeline (core)
Testing
Serilog Extensions
Diagnostics
Recipes
- AWS Lambda — API Gateway
- AWS Lambda — SQS
- Azure Functions — HTTP
- SQS polling console
- ASP.NET Core integration
- BackgroundService worker
- Webhook receiver
- Multi-command CLI
- File watcher
- Configuration reload
Repo · NuGet · NuGet — Testing · NuGet — Serilog · NuGet — Diagnostics