NPv.Messaging.Abstractions
1.2.0
dotnet add package NPv.Messaging.Abstractions --version 1.2.0
NuGet\Install-Package NPv.Messaging.Abstractions -Version 1.2.0
<PackageReference Include="NPv.Messaging.Abstractions" Version="1.2.0" />
<PackageVersion Include="NPv.Messaging.Abstractions" Version="1.2.0" />
<PackageReference Include="NPv.Messaging.Abstractions" />
paket add NPv.Messaging.Abstractions --version 1.2.0
#r "nuget: NPv.Messaging.Abstractions, 1.2.0"
#:package NPv.Messaging.Abstractions@1.2.0
#addin nuget:?package=NPv.Messaging.Abstractions&version=1.2.0
#tool nuget:?package=NPv.Messaging.Abstractions&version=1.2.0
NPv.Messaging.Abstractions
Minimal and extensible messaging interfaces for .NET.
Built to support clean architecture, DDD, and event-driven design.
✨ Provided Interfaces
Interface | Purpose |
---|---|
IEvent |
Marker interface for a domain event |
IEventHandler<TEvent> |
Handles a single event of type TEvent |
IEventDispatcher |
Dispatches events to all registered handlers |
IEventHandlingErrorReporter |
Reports exceptions during handler execution |
IOutbox |
Persists events for reliable later delivery |
IEventQueue |
Sends events to an external queue system |
IEventQueueConsumer |
Consumes and processes queued events |
Note: Unit of Work abstractions now live in the separate package NPv.Uow.Abstractions.
🔧 Use Cases
- Modular domain event handling
- CQRS with the Outbox pattern
- Transport-agnostic event queues
- Clean and testable architecture
📦 NuGet
dotnet add package NPv.Messaging.Abstractions
🛠 Example
public class OrderCreatedEvent : IEvent { }
public class OrderCreatedHandler : IEventHandler<OrderCreatedEvent>
{
public Task HandleAsync(OrderCreatedEvent evt, CancellationToken cancellationToken = default)
{
Console.WriteLine($"Order created: {evt}");
return Task.CompletedTask;
}
}
🧩 Related Projects
- NPv.Messaging.Infrastructure — runtime implementations of these interfaces. (future library)
Author's Note
This library grew out of my long-standing personal interest in structuring and publishing open source packages. Over time, I’ve revisited and refined earlier internal utilities and ideas, giving them a more consistent shape and preparing them for wider reuse. Along the way, I’ve also taken the opportunity to explore how open source distribution and licensing work in the .NET ecosystem.
It’s a small step toward something I’ve always wanted to try — sharing practical, minimal tools that reflect years of learning, experimentation, and refinement.
Hopefully, someone finds it useful.
Nikolai 😛
⚖️ License
MIT — you are free to use this in commercial and open-source software.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | 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 was computed. 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. |
-
net9.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.