Table of Contents

Class IntegrationEventBase

Namespace
Compendium.Core.Domain.Events
Assembly
Compendium.Core.dll

Base class for integration events providing common properties and behavior. Integration events are used for communication between different bounded contexts or external systems.

public abstract record IntegrationEventBase : IIntegrationEvent, IEquatable<IntegrationEventBase>
Inheritance
IntegrationEventBase
Implements
Derived
Inherited Members

Constructors

IntegrationEventBase(int, string?, string?)

Initializes a new instance of the IntegrationEventBase class.

protected IntegrationEventBase(int eventVersion = 1, string? correlationId = null, string? causationId = null)

Parameters

eventVersion int

The version of the event schema (default: 1).

correlationId string

The correlation identifier for tracking related events.

causationId string

The causation identifier linking this event to its cause.

Properties

CausationId

Gets the causation identifier linking this event to the command or event that caused it.

public string? CausationId { get; }

Property Value

string

CorrelationId

Gets the correlation identifier for tracking related events across systems.

public string? CorrelationId { get; }

Property Value

string

EventId

Gets the unique identifier of the integration event.

public Guid EventId { get; }

Property Value

Guid

EventType

Gets the name of the event type for serialization and routing purposes.

public abstract string EventType { get; }

Property Value

string

EventVersion

Gets the version of the event schema for backward compatibility.

public int EventVersion { get; }

Property Value

int

OccurredOn

Gets the timestamp when the event occurred.

public DateTimeOffset OccurredOn { get; }

Property Value

DateTimeOffset

SourceSystem

Gets or sets the source system that produced this event.

public string? SourceSystem { get; init; }

Property Value

string

TenantId

Gets or sets the tenant identifier for multi-tenant systems.

public string? TenantId { get; init; }

Property Value

string