JG.EventKit 1.0.1

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

dotnet-event-kit

NuGet Downloads License CI


A lightweight, high-performance in-process event bus for .NET applications. Publish strongly-typed events, subscribe async handlers, and decouple components without external message brokers.

Features

  • Strongly-typed events — publish and subscribe with full type safety, no casting or string keys
  • Async-native handlers — all handlers are ValueTask-based with CancellationToken support
  • Ordered dispatch — handlers execute in registration order with configurable parallelism
  • Handler priorities — control execution order across independently registered handlers
  • Scoped & singleton handlers — register handlers with DI lifetime management
  • Error isolation — one handler failure doesn't kill other subscribers; configurable error policies
  • Event filtering — subscribe to events matching a predicate without processing every publish
  • Dead letter support — capture events with no registered handlers for debugging
  • Middleware pipeline — wrap event dispatch with cross-cutting concerns (logging, timing, retry)
  • Zero external dependencies — built entirely on .NET 8 primitives

Installation

dotnet add package JG.EventKit

Quick Start

// Register in DI
builder.Services.AddEventKit(options =>
{
    options.OnError = EventErrorPolicy.LogAndContinue;
});

// Define an event
public record UserRegistered(string UserId, string Email, DateTime Timestamp);

// Subscribe a handler
builder.Services.AddEventHandler<UserRegistered, WelcomeEmailHandler>();

public class WelcomeEmailHandler : IEventHandler<UserRegistered>
{
    public async ValueTask HandleAsync(UserRegistered e, CancellationToken ct)
    {
        await SendWelcomeEmail(e.Email, ct);
    }
}

// Publish from anywhere
public class RegistrationService(IEventBus bus)
{
    public async Task RegisterAsync(string email)
    {
        var user = CreateUser(email);
        await bus.PublishAsync(new UserRegistered(user.Id, email, DateTime.UtcNow));
    }
}

Documentation

  • Getting Started — Setup, handlers, middleware, and full examples
  • API Reference — Complete API surface with type tables and code samples

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

Licensed under the Apache License 2.0. See LICENSE for details.


Ready to get started? Install via NuGet and check out the API reference.

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 was computed.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.1 83 3/4/2026