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
eventVersionintThe version of the event schema (default: 1).
correlationIdstringThe correlation identifier for tracking related events.
causationIdstringThe 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
CorrelationId
Gets the correlation identifier for tracking related events across systems.
public string? CorrelationId { get; }
Property Value
EventId
Gets the unique identifier of the integration event.
public Guid EventId { get; }
Property Value
EventType
Gets the name of the event type for serialization and routing purposes.
public abstract string EventType { get; }
Property Value
EventVersion
Gets the version of the event schema for backward compatibility.
public int EventVersion { get; }
Property Value
OccurredOn
Gets the timestamp when the event occurred.
public DateTimeOffset OccurredOn { get; }
Property Value
SourceSystem
Gets or sets the source system that produced this event.
public string? SourceSystem { get; init; }
Property Value
TenantId
Gets or sets the tenant identifier for multi-tenant systems.
public string? TenantId { get; init; }