Table of Contents

Namespace Savvyio.EventDriven

Assembly: Savvyio.Core.dll

Use the Savvyio.EventDriven namespace to define and dispatch integration events — messages that cross service boundaries and enable eventual consistency in a distributed system. An integration event announces that something has happened in one service so that other services can react.

Start with IntegrationEvent as the base class for your cross-service event payloads. Register an IntegrationEventHandler and connect it to the DI container with SavvyioOptions.AddIntegrationEventDispatcher and AddIntegrationEventHandler. Use the extension methods on IIntegrationEvent to read the event ID, timestamp, and member type from the event's metadata.

Availability: .NET 10 and .NET 9

Extension Members

Type Ext Methods
T ⬇️ GetEventId<T>, GetTimestamp<T>, GetMemberType<T>
SavvyioOptions ⬇️ AddIntegrationEventHandler<TImplementation>, AddIntegrationEventDispatcher

Classes

IntegrationEvent

Provides a default implementation of of the IIntegrationEvent interface.

IntegrationEventDispatcher

Provides a default implementation of of the IIntegrationEventDispatcher interface.

IntegrationEventExtensions

Extension methods for the IIntegrationEvent interface.

IntegrationEventHandler

Provides a generic and consistent way of handling Integration Event objects that implements the IIntegrationEvent interface. This is an abstract class.

SavvyioOptionsExtensions

Extension methods for the SavvyioOptions class.

Interfaces

IIntegrationEvent

A marker interface that specifies something that happened when an object was successfully persisted and you want other subsystems (out-process/inter-application) to be made aware of.

IIntegrationEventDispatcher

Defines an Integration Event dispatcher that uses Fire-and-Forget/In-Only MEP.

IIntegrationEventHandler

Specifies a handler responsible for objects that implements the IIntegrationEvent interface.