EventHighway 2.2.0

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

EventHighway

BUILD Nuget Nuget The Standard - COMPLIANT The Standard The Standard Community

0 - EventHighway

EventHighway is Standard-Compliant .NET library for event-driven programming. It is designed to be simple, lightweight, and easy to use.

0.1 - How It Works

Publish an event once and it fans out to every matching listener, each producing a durable delivery record you can observe, retry, archive and replay. The full V2 flow โ€” submission, filtering, loop detection, retries (Fibonacci backoff), archiving and replay โ€” is documented in plain language here:

๐Ÿ“– EventHighway V2 โ€” Design & Flow

0.2 - Operations Portal

A Standard-compliant Blazor Server console for operating an EventHighway installation: RAG health dashboards, event/archive browsing, bulk & single-item replay, participant and secret management, and user administration.

๐Ÿ“– EventHighway Operations Portal โ€” Design & User Guide

EventHighway Operations Portal โ€” Health Status dashboard

1 - Version Information

V2 Client is the latest version and should be used when possible. It is highly recommended to transition from previous versions to V2 for all new development, as support will end for older versions. The V2 client is available in the v2.11 release and later.

Obsolete Version 0 / Version 1 is now considered obsolete for new adoption. Emphasis is on V2 for all new development, and existing users of Version 0 / Version 1 are encouraged to upgrade to V2 to benefit from the new features.

Recommended V2 (released in v2.11) is the current recommended version for reliable event delivery.

2 - How to Use Basics (V2)

2.0 - Installation & Initialization

V2 runs against SQL Server or PostgreSQL. Install the provider package of your choice (EventHighway.SqlServer or EventHighway.PostgreSql), then construct the client with the corresponding storage provider and configuration โ€” the database is created and migrated automatically on first use:

var configuration = new EventHighwayConfiguration();

// SQL Server
IClientV2 eventHighway = new EventHighwayClient(
	new SqlServerStorageBrokerProvider(
		"Server=.;Database=EventHighwayDB;Trusted_Connection=True;MultipleActiveResultSets=true"),
	configuration).V2;

// PostgreSQL
IClientV2 eventHighway = new EventHighwayClient(
	new PostgreSqlStorageBrokerProvider(
		"Host=localhost;Port=5432;Database=EventHighwayDB;Username=postgres;Password=postgres"),
	configuration).V2;

2.1 - Registering a Handler

V2 delivers events to in-process handlers โ€” no HTTP endpoint required. Register a handler by its stable HandlerId:

var handler = new DelegateEventHandler(
	id: SomeStableHandlerId,
	handleAsync: (content, cancellationToken) =>
		ValueTask.FromResult(new EventHandlerResult { IsSuccess = true, ResponseCode = "200" }),
	name: "Students Handler");

eventHighway.RegisterEventHandler(handler);

2.2 - Registering an Address & Listener

Events target an EventAddressV2 (a named channel); an EventListenerV2 subscribes a handler to that address:

DateTimeOffset now = DateTimeOffset.UtcNow;

EventAddressV2 address = await eventHighway.EventAddressV2Client
	.RetrieveOrRegisterEventAddressV2Async(new EventAddressV2
	{
		Id = Guid.NewGuid(),
		Name = "students",
		Description = "Student domain events",
		CreatedDate = now,
		UpdatedDate = now
	});

await eventHighway.EventListenerV2Client.RetrieveOrRegisterEventListenerV2Async(new EventListenerV2
{
	Id = Guid.NewGuid(),
	Name = "Students API Listener",
	HandlerId = handler.Id,
	HandlerName = handler.Name,
	EventAddressV2Id = address.Id,
	CreatedDate = now,
	UpdatedDate = now
});

A listener can optionally carry PromotedProperties + FilterCriteria so its handler only receives events that match (e.g. double.Parse(meta("Rating")) >= 8.0).

2.3 - Publishing & Observing

await eventHighway.EventV2Client.SubmitEventV2Async(new EventV2
{
	Id = Guid.NewGuid(),
	EventAddressV2Id = address.Id,
	EventName = "StudentRegistered",
	Content = "{ \"studentId\": 123 }",
	// omit ScheduledDate for immediate dispatch; set it for a scheduled event
	CreatedDate = now,
	UpdatedDate = now
});

IQueryable<ListenerEventV2> deliveries =
	await eventHighway.ListenerEventV2Client.RetrieveAllListenerEventV2sAsync();

A published EventV2 produces one ListenerEventV2 delivery record per matching listener โ€” each with a Status (Pending / Success / Error / Replay) and the handler's response. Scheduled events wait until you call FireScheduledPendingEventV2sAsync(). Events may be attributed to an EventParticipantV2 and authorized with a participant secret.


3 - Code Samples

Runnable, end-to-end samples and in-depth guides:

Sample Description
EventHighway V2 โ€” Design & Flow Plain-language walkthrough of submit, dispatch, filtering, loop detection, retries, archiving and replay
EventHighway.ClientV2.BasicApp A complete console sample: register handlers, publish immediate & scheduled events, filtering, loop detection, targeted replay, and a health summary
EventHighway.ClientV2.SubstrateApp A service-to-service (in-process substrate) sample using the same V2 client

Legacy V1 guides remain under EventHighway.Core/Resources/CodeSamples/V1 for existing users, but new development should target V2.


4 - Contributing

Everyone is welcome to contribute โ€” whichever way suits you best:

  • Suggest โ€” log a feature request or bug report under Issues.
  • Build โ€” pick up an open feature request and help with development.
  • Verify โ€” help with testing, reviewing pull requests, or hardening acceptance coverage.

All contributions follow The Standard โ€” test-driven, one layer at a time.

4.1 - Database Migrations (Dual Provider)

EventHighway ships two storage providers โ€” SQL Server and PostgreSQL โ€” and both must stay schema-identical. If your change touches the database (new entity, new column, index, etc.), you must add a matching EF Core migration to both provider projects:

Provider Project
SQL Server EventHighway.SqlServer
PostgreSQL EventHighway.PostgreSql

Each provider project contains its own design-time context factory, so migrations are generated directly against the provider project. By default the factories target a local database ((localdb)\MSSQLLocalDB for SQL Server, localhost:5432 for PostgreSQL); set the CONNECTION_STRING environment variable to override.

.NET CLI

From the solution root:

# SQL Server
dotnet ef migrations add <YourMigrationName> --project EventHighway.SqlServer --startup-project EventHighway.SqlServer

# PostgreSQL
dotnet ef migrations add <YourMigrationName> --project EventHighway.PostgreSql --startup-project EventHighway.PostgreSql

Visual Studio (Package Manager Console)

# SQL Server
Add-Migration <YourMigrationName> -Project EventHighway.SqlServer -StartupProject EventHighway.SqlServer

# PostgreSQL
Add-Migration <YourMigrationName> -Project EventHighway.PostgreSql -StartupProject EventHighway.PostgreSql

Use the same migration name for both providers, and include both generated migrations (plus the updated model snapshots) in your pull request. The CI build runs acceptance tests against both providers, so a missing migration on either side will fail the build.


Walk-through Video

TBC

Note

EventHighway is an officially released, Standard-Compliant Pub/Sub core library that can be deployed within an API or any Console Application. It is intentionally platform-agnostic so it can process events from anywhere to anywhere. V2 is an in-process event bus with durable delivery records, moving well beyond the original fire-and-forget model.

Current V2 capabilities include:

  • In-Process Handlers โ€” deliver events to registered IEventHandler code by HandlerId; no HTTP endpoint required.
  • Immediate & Scheduled Events โ€” instant dispatch, or time-deferred delivery fired by FireScheduledPendingEventV2sAsync.
  • Filtering & Promoted Properties โ€” optional - listeners receive only events matching their FilterCriteria if specified.
  • Delivery Observability โ€” one ListenerEventV2 per event listener with Pending / Success / Error / Replay status and the handler's response.
  • Loop Detection & Quarantine โ€” configurable thresholds guard against runaway republishing.
  • Participants & Secrets โ€” attribute and authorize events to an EventParticipantV2 via rotating secrets.
  • Retries โ€” listener-level budgets with incremental (Fibonacci) backoff for resilient delivery.
  • Archiving & Replay โ€” processed events are archived, then replayed in bulk or to a targeted listener for back-fill.
  • Pluggable Storage Providers โ€” anything implementing the storage-provider contract; SQL Server and PostgreSQL ship today.
  • Operations Portal โ€” a Standard-compliant Blazor Server console for operating an installation (ยง0.2):
    • Health dashboards โ€” RAG status board (live) plus statistics dashboards (traffic, usage by address/participant, retries, loops, duplicates).
    • Events โ€” browse and inspect event content; archive processed events.
    • Archived events โ€” browse, purge by date, and replay a single item from its detail view.
    • Bulk replay โ€” re-deliver archived events scoped by address, listener, and/or date range.
    • Event participants & secrets โ€” manage participants and add/rotate/revoke their secrets.
    • Event addresses & listeners โ€” register and manage addresses and their listeners.
    • User administration โ€” roles, lockout, 2FA, disable/delete, and email-confirmation / password-reset links.
    • User โ†” participant associations โ€” link users to participants (from both the user and participant screens).
    • Self-service (My Account โ†’ Participant Management) โ€” association-scoped, read-only participant view with secret self-management; no admin bypass.

Standard-Compliance

This library was built according to The Standard. The library follows engineering principles, patterns and tooling as recommended by The Standard.

This library is also a community effort which involved many nights of pair-programming, test-driven development and in-depth exploration research and design discussions.


Standard-Promise

The most important fulfillment aspect in a Standard compliant system is aimed towards contributing to people, its evolution, and principles. An organization that systematically honors an environment of learning, training, and sharing knowledge is an organization that learns from the past, makes calculated risks for the future, and brings everyone within it up to speed on the current state of things as honestly, rapidly, and efficiently as possible.

We believe that everyone has the right to privacy, and will never do anything that could violate that right. We are committed to writing ethical and responsible software, and will always strive to use our skills, coding, and systems for the good. We believe that these beliefs will help to ensure that our software(s) are safe and secure and that it will never be used to harm or collect personal data for malicious purposes.

The Standard Community as a promise to you is in upholding these values.


Important Notice and Acknowledgements

A special thanks to all the community members, and the following dedicated engineers for their hard work and dedication to this project.

Mr. Hassan Habib

Mr. Christo du Toit

Mr. Zafar Urakov

Mr.Abdulsamad Osunlana

Mr.Nodirkhan Abdumurotov

Mr.Kailu Hu

Mr.Greg Hays

Mr.Ahmad Salim

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 (2)

Showing the top 2 NuGet packages that depend on EventHighway:

Package Downloads
EventHighway.PostgreSql

PostgreSQL provider for EventHighway.

EventHighway.SqlServer

SQL Server provider for EventHighway.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.2.0 39 7/18/2026
2.1.0 221 3/3/2026
2.0.0 126 2/28/2026
1.3.2 320 5/23/2025
1.3.0 321 4/29/2025
1.2.0 260 4/28/2025
1.1.0 800 3/26/2025
1.0.0 643 3/25/2025
0.6.0 285 1/3/2025
0.5.0 282 11/18/2024
0.4.0 207 11/18/2024
0.3.0 188 11/18/2024
0.2.0 247 11/10/2024
0.1.1 240 11/4/2024
0.1.0 198 11/4/2024

V2 capabilities include:
* In-Process Handlers โ€” deliver events to registered IEventHandler code by HandlerId; no HTTP endpoint required.
* Immediate & Scheduled Events โ€” instant dispatch, or time-deferred delivery fired by FireScheduledPendingEventV2sAsync.
* Filtering & Promoted Properties โ€” optional - listeners receive only events matching their FilterCriteria if specified.
* Delivery Observability โ€” one ListenerEventV2 per event listener with Pending / Success / Error / Replay status and the handler's response.
* Loop Detection & Quarantine โ€” configurable thresholds guard against runaway republishing.
* Participants & Secrets โ€” attribute and authorize events to an EventParticipantV2 via rotating secrets.
* Retries โ€” listener-level budgets with incremental (Fibonacci) backoff for resilient delivery.
* Archiving & Replay โ€” processed events are archived, then replayed in bulk or to a targeted listener for back-fill.
* Pluggable Storage Providers โ€” anything implementing the storage-provider contract; SQL Server and PostgreSQL ship today.
* Operations Portal โ€” a Standard-compliant Blazor Server console for operating an installation (§0.2):
* Health dashboards โ€” RAG status board (live) plus statistics dashboards (traffic, usage by address/participant, retries, loops, duplicates).
* Events โ€” browse and inspect event content; archive processed events.
* Archived events โ€” browse, purge by date, and replay a single item from its detail view.
* Bulk replay โ€” re-deliver archived events scoped by address, listener, and/or date range.
* Event participants & secrets โ€” manage participants and add/rotate/revoke their secrets.
* Event addresses & listeners โ€” register and manage addresses and their listeners.
* User administration โ€” roles, lockout, 2FA, disable/delete, and email-confirmation / password-reset links.
* User โ†” participant associations โ€” link users to participants (from both the user and participant screens).
* Self-service (My Account โ†’ Participant Management) โ€” association-scoped, read-only participant view with secret self-management; no admin bypass.