dotnet-cqrs/Svrnty.CQRS.Events.Abstractions/Subscriptions/SubscriptionTypes.cs

54 lines
1.1 KiB
C#

namespace Svrnty.CQRS.Events.Abstractions.Subscriptions;
/// <summary>
/// Status of a persistent subscription.
/// </summary>
public enum SubscriptionStatus
{
/// <summary>
/// Subscription is active and receiving events.
/// </summary>
Active = 0,
/// <summary>
/// Subscription completed (terminal event received).
/// </summary>
Completed = 1,
/// <summary>
/// Subscription expired (TTL reached).
/// </summary>
Expired = 2,
/// <summary>
/// Subscription cancelled by user.
/// </summary>
Cancelled = 3,
/// <summary>
/// Subscription paused (temporarily inactive).
/// </summary>
Paused = 4
}
/// <summary>
/// How events should be delivered to clients.
/// </summary>
public enum DeliveryMode
{
/// <summary>
/// Push events immediately when they occur.
/// </summary>
Immediate = 0,
/// <summary>
/// Batch events and deliver periodically.
/// </summary>
Batched = 1,
/// <summary>
/// Only deliver on reconnect (saves bandwidth for background updates).
/// </summary>
OnReconnect = 2
}