dotnet-cqrs/Svrnty.CQRS.Events.Abstractions/Streaming/StreamType.cs

30 lines
1.1 KiB
C#

namespace Svrnty.CQRS.Events.Abstractions.Streaming;
/// <summary>
/// Defines the storage semantics for an event stream.
/// </summary>
/// <remarks>
/// <para>
/// <strong>Ephemeral</strong>: Message queue semantics where events are deleted after consumption.
/// Suitable for notifications, real-time updates, and transient data that doesn't need to be replayed.
/// </para>
/// <para>
/// <strong>Persistent</strong>: Event log semantics where events are retained for future replay.
/// Suitable for audit logs, event sourcing, analytics, and any scenario requiring event history.
/// </para>
/// </remarks>
public enum StreamType
{
/// <summary>
/// Ephemeral stream: Events are deleted after consumption (message queue semantics).
/// Fast and memory-efficient, but no replay capability.
/// </summary>
Ephemeral = 0,
/// <summary>
/// Persistent stream: Events are retained in an append-only log (event sourcing semantics).
/// Enables replay, audit trails, and time-travel queries, but requires more storage.
/// </summary>
Persistent = 1
}