Interface IDistributedEvent
Namespace: Momentum.Extensions.Abstractions.Messaging
Assembly: Momentum.Extensions.Abstractions.dll
Represents a distributed event that can be published across service boundaries.
csharp
public interface IDistributedEvent
Remarks
Events are used to communicate state changes between different services or bounded contexts in a distributed system. They enable eventual consistency by notifying other parts of the system about important domain events.
Methods
GetPartitionKey()
Gets the partition key for this event.
csharp
string GetPartitionKey()
Returns
A string representing the partition key used for message routing and ordering. Events with the same partition key are guaranteed to be processed in order.
Remarks
The partition key is typically derived from an entity identifier or aggregate root ID to ensure related events are processed sequentially.