LiteBus.Runtime 6.0.0

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

LiteBus

<p align="center"> <img src="assets/logo/litebus-logo.svg" alt="LiteBus logo" width="360"> </p>

<p align="center"> <a href="https://github.com/litenova/LiteBus/actions/workflows/build-and-test.yml"><img src="https://github.com/litenova/LiteBus/actions/workflows/build-and-test.yml/badge.svg" alt="Build and test status"></a> <a href="https://codecov.io/gh/litenova/LiteBus"><img src="https://codecov.io/gh/litenova/LiteBus/graph/badge.svg?token=XBNYITSV5A" alt="Code coverage"></a> <a href="https://www.nuget.org/packages/LiteBus"><img src="https://img.shields.io/nuget/v/LiteBus.svg" alt="NuGet version"></a> <a href="https://www.nuget.org/packages/LiteBus"><img src="https://img.shields.io/nuget/dt/LiteBus.svg" alt="NuGet downloads"></a> <a href="https://github.com/litenova/LiteBus/releases"><img src="https://img.shields.io/github/v/release/litenova/LiteBus" alt="GitHub release"></a> <a href="https://github.com/litenova/LiteBus/blob/main/LICENSE"><img src="https://img.shields.io/github/license/litenova/LiteBus" alt="License"></a> <a href="https://dotnet.microsoft.com/download/dotnet/10.0"><img src="https://img.shields.io/badge/.NET-10.0-512BD4" alt=".NET 10"></a> <a href="https://litebus.io"><img src="https://img.shields.io/badge/docs-litebus.io-2f6fed" alt="Documentation"></a> </p>

LiteBus is a mediator and durable messaging library for .NET 10. Commands, queries, and events have separate contracts and pipelines. Inbox and outbox processing use explicit storage, dispatch, and ingress adapters, so an application references an external SDK only when it selects that integration.

Version 6.0.0 targets .NET 10 and introduces the current module, durable messaging, transport, and hosting model. Applications upgrading from v5 should follow the v5 to v6 migration guide, including its database replacement and data-migration guidance. See the v6 changelog for the complete release record.

Package Selection

Install the package for each application concern. The package brings its abstractions and lower-layer runtime dependencies with it.

Concern Package
Core mediator and durable contracts LiteBus
Commands LiteBus.Commands.Extensions.Microsoft.DependencyInjection
Queries LiteBus.Queries.Extensions.Microsoft.DependencyInjection
Events LiteBus.Events.Extensions.Microsoft.DependencyInjection
Inbox core LiteBus.Inbox
Outbox core LiteBus.Outbox
PostgreSQL storage LiteBus.Inbox.Storage.PostgreSql or LiteBus.Outbox.Storage.PostgreSql
Entity Framework Core storage LiteBus.Inbox.Storage.EntityFrameworkCore or LiteBus.Outbox.Storage.EntityFrameworkCore
In-memory storage for tests LiteBus.Inbox.Storage.InMemory or LiteBus.Outbox.Storage.InMemory
In-process dispatch LiteBus.Inbox.Dispatch.InProcess or LiteBus.Outbox.Dispatch.InProcess
Broker dispatch or ingress Install the matching LiteBus.Inbox.Dispatch.*, LiteBus.Outbox.Dispatch.*, or LiteBus.Inbox.Ingress.* package
Broker transport LiteBus.Transport.Amqp, LiteBus.Transport.Kafka, LiteBus.Transport.AwsSqs, or LiteBus.Transport.AzureServiceBus
Generic Host bridge LiteBus.Runtime.Extensions.Microsoft.Hosting
OpenTelemetry registration LiteBus.Inbox.Extensions.OpenTelemetry, LiteBus.Outbox.Extensions.OpenTelemetry, or LiteBus.Transport.Extensions.OpenTelemetry

The Dependency Graph lists every package, its architectural layer, and its direct references.

Read the published documentation at litebus.io, browse the package and feature index, or run the Fumadocs site locally from site.

Quick Start

Install one or more semantic mediator modules:

dotnet add package LiteBus.Commands.Extensions.Microsoft.DependencyInjection
dotnet add package LiteBus.Queries.Extensions.Microsoft.DependencyInjection
dotnet add package LiteBus.Events.Extensions.Microsoft.DependencyInjection

Define a command and one handler:

public sealed record CreateProductCommand(string Name, decimal Price) : ICommand<Guid>;

public sealed class CreateProductCommandHandler : ICommandHandler<CreateProductCommand, Guid>
{
    public Task<Guid> HandleAsync(
        CreateProductCommand command,
        CancellationToken cancellationToken)
    {
        var productId = Guid.NewGuid();
        return Task.FromResult(productId);
    }
}

Register the messaging and semantic features in one callback. The module registry validates the completed dependency graph, so callback order does not change build order:

builder.Services.AddLiteBus(liteBus =>
{
    var applicationAssembly = typeof(Program).Assembly;

    liteBus.AddMessaging(_ => { });
    liteBus.AddCommands(commands =>
        commands.RegisterFromAssembly(applicationAssembly));
    liteBus.AddQueries(queries =>
        queries.RegisterFromAssembly(applicationAssembly));
    liteBus.AddEvents(events =>
        events.RegisterFromAssembly(applicationAssembly));
});

Inject the mediator for the operation being performed:

var productId = await commandMediator.SendAsync(
    new CreateProductCommand("Widget", 9.99m),
    cancellationToken);

The Getting Started guide covers commands, queries, events, module declaration, and handler discovery.

Durable Messaging

An inbox stores a command before execution. An outbox stores an event before publication. Storage, dispatch, ingress, and hosted processing remain separate choices.

builder.Services.AddLiteBus(liteBus =>
{
    liteBus.AddMessaging(_ => { });
    liteBus.AddCommands(commands =>
        commands.RegisterFromAssembly(typeof(Program).Assembly));

    liteBus.AddInbox(inbox =>
    {
        inbox.Contracts.Register<CreateProductCommand>("catalog.create-product");
        inbox.UseInMemoryStorage();
        inbox.UseInProcessDispatch();
        inbox.EnableInboxProcessor();
    });
});

Use in-memory storage for tests and local behavior checks. Use the PostgreSQL or Entity Framework Core adapter when durable writes must participate in an application transaction. See Inbox, Outbox, and Transactional Messaging Writes.

Architecture

LiteBus projects follow an explicit dependency role matrix. Every shipping project is assigned one role, and architecture tests reject forbidden project edges and direct package references.

Dependency role Responsibility
Platform, mediation, and durable contracts Stable abstractions without SDK or host dependencies
Core implementation Default implementations and broker-neutral runtime behavior
Technology adapter One persistence or broker technology
Feature bridge Storage, dispatch, ingress, and cross-feature integration
Host adapter Dependency injection, hosting, ASP.NET Core, diagnostics, and telemetry composition
Consumer tooling and aggregate Analyzer/test support and the core-only convenience package

The project count is intentional. Inbox and outbox remain separate, each broker and store remains opt-in, and integration SDKs do not enter unrelated dependency graphs. See Architecture for the module lifecycle and package rules.

Documentation

Repository documentation is authoritative. Start with the Documentation Index.

Subject Reference
Compile-checked application sample LiteBus Sample
Capability and package inventory v6 Feature Index and Capability Catalog
Module and dependency model Architecture and Dependency Graph
Handler behavior Handler Pipeline and Execution Context
Reliable messaging Reliable Messaging Semantics
Operations Production Runbook and Diagnostics and Health
Testing Testing and Integration Tests
Upgrade work Migration Guide v6

Build and Test

dotnet restore LiteBus.slnx
dotnet build LiteBus.slnx --configuration Release --no-restore
dotnet test LiteBus.slnx --configuration Release --no-build
pwsh ./scripts/Test-Documentation.ps1

Docker is required for the PostgreSQL, AMQP, Kafka, AWS SQS emulator, Azure Service Bus emulator, and relational integration suites. The Integration Tests guide lists the CI categories and local commands.

Contributing

Read Contributing before changing public APIs, package references, module dependencies, or persisted envelope behavior.

LiteBus is licensed under the MIT License.

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 (2)

Showing the top 2 NuGet packages that depend on LiteBus.Runtime:

Package Downloads
LiteBus.Runtime.Extensions.Microsoft.DependencyInjection

Host-framework composition APIs for the LiteBus.Runtime.Extensions.Microsoft.DependencyInjection package.

LiteBus.Runtime.Extensions.Autofac

Host-framework composition APIs for the LiteBus.Runtime.Extensions.Autofac package.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
6.0.0 0 7/18/2026
5.0.0 11,213 5/29/2026
4.4.0 10,098 5/19/2026
4.3.0 66,687 2/17/2026
4.2.0 70,102 11/11/2025
4.1.0 1,994 10/30/2025
4.0.0 7,271 9/18/2025