EventHighway is Standard-Compliant .NET library for event-driven programming. It is designed to be simple, lightweight, and easy to use.
Use the latest version when possible.
Version 0 introduced a Fire and Forget model — publish events and move on.
V1 (released in v2.10) evolves this into Fire and Observe — publish events and track what happened per listener with better visibility and operational confidence.
Note
Version 0 is the initial release and is now considered obsolete for new adoption. Emphasis is on V1 for all new development, and existing users of Version 0 are encouraged to upgrade to V1 to benefit the new observability features.
Tip
V1 (released in v2.10) is the recommended version for teams that need observable, reliable event delivery.
You must define a connection string that points to a SQL DB Server when initializing the EventHighway client as follows:
var eventHighway = new EventHighwayClient("Server=.;Database=EventHighwayDB;Trusted_Connection=True;");In order for an event to be published, it must target a certain EventAddressV1. You can register an EventAddressV1 as follows:
DateTimeOffset now = DateTimeOffset.UtcNow;
var eventAddressV1 = new EventAddressV1
{
Id = Guid.NewGuid(),
Name = "EventAddressName",
Description = "EventAddressDescription",
CreatedDate = now,
UpdatedDate = now
};
await eventHighway.EventAddressV1s.RegisterEventAddressV1Async(eventAddressV1);Make sure you store your EventAddressV1 Id in a safe place, as you will need it to publish events to that address.
In order to listen to events, you must register an EventListenerV1 as follows:
DateTimeOffset now = DateTimeOffset.UtcNow;
var eventListenerV1 = new EventListenerV1
{
Id = Guid.NewGuid(),
Name = "Students API Listener",
Description = "Receives student domain events",
HeaderSecret = "super-secret-token",
Endpoint = "https://my.endpoint.com/api/v1.0/students",
EventAddressId = SomePreconfiguredEventAddressId,
CreatedDate = now,
UpdatedDate = now
};
await eventHighway.EventListenerV1s.RegisterEventListenerV1Async(eventListenerV1);You can publish an event as follows:
DateTimeOffset now = DateTimeOffset.UtcNow;
var eventV1 = new EventV1
{
Id = Guid.NewGuid(),
EventAddressId = SomePreconfiguredEventAddressId,
Content = "SomeStringifiedJsonContent",
Type = EventV1Type.Immediate,
CreatedDate = now,
UpdatedDate = now
};
EventV1 submittedEventV1 = await eventHighway.EventV1s.SubmitEventV1Async(eventV1);
var listenerEvents = await eventHighway.ListenerEventV1s.RetrieveAllListenerEventV1sAsync();
var deliveryResults = listenerEvents
.Where(listenerEventV1 => listenerEventV1.EventId == submittedEventV1.Id)
.ToList();When an event is submitted, notifications are sent to all registered EventListenerV1 entries for that EventAddressV1. This is the Fire and Observe behavior, where you can query ListenerEventV1 records to inspect delivery status per listener.
This is an early release of a Pub/Sub pattern core library which can be deployed within an API or simple Console Application. It was intentionally built to be platform agnostic so it can process events from anywhere to anywhere.
There are plans for more abstraction and customization in the future, such as:
- Enable plugging anything that implements
IStorageBrokerso consumers can use any storage mechanism or technology they prefer. - Enable eventing beyond RESTful APIs. Like running the library within one microservice from Service to Service in a LakeHouse model.
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.
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.




