PouryaKit
ReferencePackages

PouryaKit.Messaging.Wolverine.Marten

A Stream's messages sent through Wolverine's Marten outbox.

A Stream's messages sent through Wolverine's Marten outbox. It registers the Host's one Marten store and joins it to the Kit's one message store, so a Stream Module's events commit with the Notifications and Integration Events they cause.

Install

dotnet add package PouryaKit.Messaging.Wolverine.Marten --prerelease

When to use it

  • A Host runs Stream Modules, beside EF Core Modules or without them.
  • A Stream publishes Integration Events.

It joins PouryaKit.Persistence.Marten to PouryaKit.Messaging.Wolverine. In a Host that also has EF Core Modules, PouryaKit.Messaging.Wolverine.EFCore declares the store this one joins.

Quick start

Register the Host's Marten store. A Host of Stream Modules alone calls only UsePouryaKitMarten, which declares the message store itself; a Host that also has EF Core Modules calls it after UsePouryaKitWolverine of PouryaKit.Messaging.Wolverine.EFCore:

builder.UsePouryaKitWolverine(connectionName: "app");
builder.UsePouryaKitMarten(connectionName: "app");

What you get

  • A Stream's events, Notifications and Integration Events in one commit.
  • One store for every Stream Module of the Host, and one message store.
  • In a Host of Stream Modules alone, a registration that declares the message store itself.

Call this registration second in a Host with EF Core Modules: in the other order the EF call throws, naming the order, since Wolverine is registered once.

Learn more

On this page