PouryaKit.Messaging
0.1.0-preview.2
dotnet add package PouryaKit.Messaging --version 0.1.0-preview.2
NuGet\Install-Package PouryaKit.Messaging -Version 0.1.0-preview.2
<PackageReference Include="PouryaKit.Messaging" Version="0.1.0-preview.2" />
<PackageVersion Include="PouryaKit.Messaging" Version="0.1.0-preview.2" />
<PackageReference Include="PouryaKit.Messaging" />
paket add PouryaKit.Messaging --version 0.1.0-preview.2
#r "nuget: PouryaKit.Messaging, 0.1.0-preview.2"
#:package PouryaKit.Messaging@0.1.0-preview.2
#addin nuget:?package=PouryaKit.Messaging&version=0.1.0-preview.2&prerelease
#tool nuget:?package=PouryaKit.Messaging&version=0.1.0-preview.2&prerelease

PouryaKit.Messaging
The contracts Feature code uses to react after a commit and to tell other Modules what happened. A Notification Handler reacts to a Domain Event once the change is committed, an Integration Event Handler applies what another Module published, and a Snapshot mapper turns an aggregate into the copy other Modules keep. This package holds no transport: PouryaKit.Messaging.Wolverine delivers them.
Install
dotnet add package PouryaKit.Messaging --prerelease
When to use it
- Something must happen after a change commits and could not be taken back: send a mail, push to a browser, call another system.
- Another Module reacts to what happened in this one.
- A Module keeps a copy of another Module's data.
- You give a message a stable name, or add a new version of it.
Feature code references this package alone. The Composition Root and the Host use PouryaKit.Messaging.Wolverine and PouryaKit.Messaging.Wolverine.EFCore.
Quick start
A Notification Handler publishes an Integration Event once the product is committed, as the Proving Sample does:
internal sealed class PublishProductCreatedNotificationHandler(IIntegrationEventPublisher events)
: INotificationHandler<ProductCreatedDomainEvent>
{
public Task<Result> Handle(
ProductCreatedDomainEvent domainEvent,
CancellationToken cancellationToken
)
{
events.Publish(
domainEvent.Id,
new ProductCreatedV1(
domainEvent.Id,
domainEvent.OccurredOn,
domainEvent.ProductId.Value,
domainEvent.Name
)
);
return Task.FromResult(Result.Success());
}
}
Another Module applies it in an Integration Event Handler, writing only the effect:
internal sealed class OpenStockItemIntegrationEventHandler(
IRepository<StockItem, StockItemId> stockItems,
OperationContext context
) : IIntegrationEventHandler<ProductCreatedV1>
{
public async Task<Result> Handle(
ProductCreatedV1 integrationEvent,
CancellationToken cancellationToken
)
{
await stockItems.AddAsync(
StockItem.Open(integrationEvent.ProductId, integrationEvent.OccurredOn, context.Tenant),
cancellationToken
);
return Result.Success();
}
}
What you get
- Three kinds of reaction, kept distinct, each with its own contract.
- Handlers that write only the effect: the Kit records the Receipt, commits and acknowledges.
- A Snapshot mapper that says what other Modules see of an aggregate, and its Tombstone.
- Declared wire and subscription names that stay stable when a class is renamed.
An outside effect happens at least once. The Receipt makes an effect in the Module's database apply once; an email, a push or a call to another system cannot roll back with it, so do the outside effect last.
Learn more
| Product | Versions 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. |
-
net10.0
- PouryaKit.Domain (>= 0.1.0-preview.2)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on PouryaKit.Messaging:
| Package | Downloads |
|---|---|
|
PouryaKit.Messaging.Wolverine
Durable deliveries on Wolverine with the message store in PostgreSQL: Notifications, Integration Events, Snapshots, delayed and recurring commands, each retried on its own. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.0-preview.2 | 99 | 11/1/2026 |
| 0.1.0-preview.1 | 105 | 10/31/2026 |
| 0.1.0-preview.0.28 | 100 | 10/26/2026 |