OpinionatedEventing.Abstractions 0.9.0

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

OpinionatedEventing.Abstractions

Pure contracts for the OpinionatedEventing library suite — marker interfaces, handler contracts, and base types. No NuGet dependencies.

Reference this package from domain and application assemblies that only need messaging contracts. Composition-root and infrastructure assemblies should reference OpinionatedEventing instead.

Installation

dotnet add package OpinionatedEventing.Abstractions

What's included

Type Purpose
IEvent Marker interface for fan-out domain/integration events
ICommand Marker interface for point-to-point commands
IEventHandler<TEvent> Handle an event (multiple registrations allowed per type)
ICommandHandler<TCommand> Handle a command (exactly one registration per type)
IPublisher Write events and commands to the outbox
IMessagingContext Ambient correlation and causation identifiers for the current handler scope
IMessageHandlerRunner Dispatches inbound messages to their registered handler(s)
IAggregateRoot Marks a class as a DDD aggregate root that collects domain events
AggregateRoot Convenience base class implementing IAggregateRoot
IConsumerPauseController Controls whether broker consumer workers should pause
IOutboxStore Persistence contract for the outbox
OutboxMessage Represents a message stored in the outbox pending delivery
MessageTopicAttribute Overrides the default broker topic name for an IEvent
MessageQueueAttribute Overrides the default broker queue name for an ICommand

Quick start

Define your messages in a contracts assembly:

// Events fan out to all registered handlers
public record OrderPlaced(Guid OrderId, decimal Total) : IEvent;

// Commands go to exactly one handler
public record ShipOrder(Guid OrderId) : ICommand;

Implement handlers in an application assembly:

public class OrderPlacedHandler : IEventHandler<OrderPlaced>
{
    public Task HandleAsync(OrderPlaced @event, CancellationToken ct)
    {
        // ...
        return Task.CompletedTask;
    }
}

Wire up DI and the runtime in your composition root using OpinionatedEventing:

builder.Services
    .AddOpinionatedEventing()
    .AddHandlersFromAssemblies(Assembly.GetExecutingAssembly());

Repository

github.com/SierraNL/OpinionatedEventing

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  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.
  • net8.0

    • No dependencies.
  • net9.0

    • No dependencies.

NuGet packages (1)

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

Package Downloads
OpinionatedEventing

Runtime hosting package for OpinionatedEventing — MessageHandlerRunner, MessagingContext, DI extensions, diagnostics, and options. Reference this package from composition-root/infrastructure assemblies.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.9.0 251 5/8/2026