Koto.Messaging.Wolverine 0.5.0-preview.8

This is a prerelease version of Koto.Messaging.Wolverine.
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package Koto.Messaging.Wolverine --version 0.5.0-preview.8
                    
NuGet\Install-Package Koto.Messaging.Wolverine -Version 0.5.0-preview.8
                    
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="Koto.Messaging.Wolverine" Version="0.5.0-preview.8" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Koto.Messaging.Wolverine" Version="0.5.0-preview.8" />
                    
Directory.Packages.props
<PackageReference Include="Koto.Messaging.Wolverine" />
                    
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 Koto.Messaging.Wolverine --version 0.5.0-preview.8
                    
#r "nuget: Koto.Messaging.Wolverine, 0.5.0-preview.8"
                    
#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 Koto.Messaging.Wolverine@0.5.0-preview.8
                    
#: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=Koto.Messaging.Wolverine&version=0.5.0-preview.8&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Koto.Messaging.Wolverine&version=0.5.0-preview.8&prerelease
                    
Install as a Cake Tool

Koto.Messaging.Wolverine

Wolverine + Kafka implementation of Koto messaging abstractions.

What's included

Type Purpose
WolverineIntegrationEventPublisher IIntegrationEventPublisher → IMessageBus.PublishAsync
WolverineIntegrationCommandDispatcher IIntegrationCommandDispatcher → fire-and-forget + request/reply
IntegrationEventConsumerBase<TEvent> Idempotent Kafka consumer base with DLQ routing
IntegrationCommandConsumerBase<TCommand> Kafka command consumer base with structured logging
CorrelationIdMiddleware Propagates Wolverine Envelope.CorrelationId via CorrelationContext
IProcessedMessageStore Idempotency store abstraction (in-memory default; install Koto.Messaging.Wolverine.Postgres for a durable PostgreSQL store in production)

Setup

// Program.cs
builder.Services.AddKotoWolverine(opts =>
{
    opts.RequestReplyTimeout = TimeSpan.FromSeconds(10);
    opts.IdempotencyWindow = TimeSpan.FromHours(24);
});

builder.Host.UseWolverine(opts =>
{
    opts.UseKafka("localhost:9092").AutoProvision();

    // Route outbound events to topics
    opts.PublishMessage<OrderPlacedEvent>().ToKafkaTopic("orders.order-placed");

    // Listen for inbound events
    opts.ListenToKafkaTopic("payments.payment-processed").ProcessInline();

    // Propagate correlation IDs on every handler
    opts.Policies.AddMiddleware<CorrelationIdMiddleware>();

    // Auto-dispatch domain events from EF Core aggregates to the outbox
    opts.PublishDomainEventsFromEntityFrameworkCore<IHasDomainEvents, IDomainEvent>(
        e => e.DomainEvents);
});

Kafka topic naming convention

  • Event topics: {service}.{event-type} → orders.order-placed
  • Consumer groups: {consuming-service}.{event-type}-consumer

Implementing a consumer

public sealed class PaymentProcessedConsumer
    : IntegrationEventConsumerBase<PaymentProcessedEvent>
{
    public PaymentProcessedConsumer(
        IProcessedMessageStore store,
        ILogger<IntegrationEventConsumerBase<PaymentProcessedEvent>> logger)
        : base(store, logger) { }

    protected override async Task ConsumeAsync(PaymentProcessedEvent @event, CancellationToken ct)
    {
        // domain logic here
    }
}

Production idempotency store

Replace InMemoryProcessedMessageStore with the durable PostgreSQL store from Koto.Messaging.Wolverine.Postgres:

builder.Services.AddPostgresProcessedMessageStore(connectionString);

Convention bootstrap

builder.Host.UseWolverine(opts =>
{
    // transport + AutoProvision + explicit consumer group + correlation + discovery + retry policy
    opts.UseKotoKafka(kafkaConnectionString, "my-service", typeof(SomeHandler).Assembly)
        .PublishIntegrationEvents(typeof(OrderPlacedV1).Assembly);          // route by `public const string Topic`
    // + opts.UseKotoDurableOutbox(pgConnectionString) from Koto.Messaging.Wolverine.Postgres
});

Every IIntegrationEvent of the contract assembly declares public const string Topic = "service.event-name";. A type without the constant stops the application at start — better than events lost in silence.

Default consumer retry policy

UseKotoKafka installs a default failure policy for consumers (without one Wolverine moves a message to the dead letter queue after its first exception):

  1. inline retries after 200 ms → 1 s → 3 s — they absorb short races between topics ("the event this one depends on has not been consumed yet" is routine when a service subscribes to several topics; the consumer simply throws);
  2. scheduled retries after 10 s → 30 s → 60 s (with a durable inbox they survive a restart);
  3. only then the dead letter queue.

A more specific policy of the service (opts.Policies.OnException<MyException>()...) takes priority over this default. The pattern for a consumer: when something the event depends on is not there yet, throw, so that the retry happens; a silent return loses the data for good.

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.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Koto.Messaging.Wolverine:

Package Downloads
Koto.Messaging.Wolverine.Postgres

PostgreSQL pieces of Koto messaging: durable IProcessedMessageStore for consumer idempotency (survives restarts, auto schema, background cleanup) and UseKotoDurableOutbox — one-line durable outbox defaults (envelope storage, EF Core transactions, domain event scraping).

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.5.0-preview.9 50 11/30/2026
0.5.0-preview.8 57 11/30/2026
0.5.0-preview.7 55 11/29/2026
0.5.0-preview.6 53 11/29/2026
0.5.0-preview.5 53 11/29/2026
0.5.0-preview.4 56 11/29/2026
0.5.0-preview.3 57 11/29/2026
0.5.0-preview.2 54 11/29/2026
0.5.0-preview.1 67 11/8/2026
0.4.0 170 7/21/2026
0.3.0-preview.15 94 7/21/2026
0.3.0-preview.14 90 7/21/2026
0.3.0-preview.13 79 7/21/2026
0.3.0-preview.12 82 7/21/2026
0.3.0-preview.11 83 7/21/2026
0.3.0-preview.10 83 7/21/2026
0.3.0-preview.9 87 7/21/2026
0.3.0-preview.8 81 7/21/2026
0.3.0-preview.7 90 7/21/2026
0.3.0-preview.6 80 7/20/2026
Loading failed

0.5.0-preview.8 — AddKotoEFCoreWithoutOutbox registers EF Core for a service without Wolverine in one call; a FastEndpoints command whose properties all come from the route needs no body. Nothing breaks. Since preview.7: IEventSourcedRepository in Koto.Application, WolverineFx 6 and Marten 9.64. Migration guide: https://github.com/arigatory/Koto/blob/main/docs/migrations/0.4-to-0.5.md