ModulusKit.Messaging.Abstractions 1.1.0

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

Modulus.Messaging.Abstractions

Abstractions for the Modulus messaging system — IMessageBus, IIntegrationEvent, and outbox pattern interfaces.

Installation

dotnet add package ModulusKit.Messaging.Abstractions

Key Types

Integration Events

// Define an integration event
public record OrderShipped(Guid OrderId, DateTime ShippedAt)
    : IntegrationEvent;

// IntegrationEvent base class auto-generates:
//   EventId      = Guid.NewGuid()
//   OccurredOn   = DateTime.UtcNow
//   CorrelationId = null (optional, settable via init)

Message Bus

public interface IMessageBus
{
    // Publish an event to all subscribers
    Task Publish<TEvent>(TEvent @event, CancellationToken ct = default)
        where TEvent : IIntegrationEvent;

    // Send a command (routed by type name)
    Task Send<TCommand>(TCommand command, CancellationToken ct = default)
        where TCommand : class;

    // Send a command to a specific destination
    Task Send<TCommand>(TCommand command, Uri destination, CancellationToken ct = default)
        where TCommand : class;
}

Integration Event Handlers

public class OrderShippedHandler : IIntegrationEventHandler<OrderShipped>
{
    public Task Handle(OrderShipped @event, CancellationToken ct)
    {
        // React to the cross-module event
        return Task.CompletedTask;
    }
}

Outbox Pattern

The IOutboxStore interface enables the transactional outbox pattern — events are stored alongside your business data in the same transaction, then published reliably by a background processor.

public interface IOutboxStore
{
    Task Save(IIntegrationEvent @event, CancellationToken ct = default);
    Task<IReadOnlyList<OutboxMessage>> GetPending(int batchSize, CancellationToken ct = default);
    Task MarkAsProcessed(IEnumerable<Guid> ids, CancellationToken ct = default);
}

Learn More

See the Modulus repository for full documentation.

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.
  • net10.0

    • No dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on ModulusKit.Messaging.Abstractions:

Package Downloads
ModulusKit.Messaging

Messaging library for .NET modular monoliths with MassTransit integration, supporting RabbitMQ, Azure Service Bus, and in-memory transports with transactional outbox.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.1.0 0 3/5/2026
1.0.1 37 3/3/2026