namespace Svrnty.CQRS.Events.Abstractions.Delivery; /// /// Defines the delivery guarantee semantics for event streaming. /// /// /// /// AtMostOnce: Fire-and-forget delivery with no acknowledgment. /// Fastest option but messages may be lost on failure. Suitable for metrics, telemetry. /// /// /// AtLeastOnce: Messages are retried until acknowledged. /// Most common choice. Messages may be delivered multiple times, so handlers should be idempotent. /// /// /// ExactlyOnce: Deduplication ensures no duplicate deliveries. /// Highest reliability but slowest due to deduplication overhead. Use for financial transactions. /// /// public enum DeliverySemantics { /// /// At-most-once delivery: Fire and forget, no retries, might lose messages. /// Fastest option with minimal overhead. /// AtMostOnce = 0, /// /// At-least-once delivery: Retry until acknowledged, might see duplicates. /// Recommended default for most scenarios. Requires idempotent handlers. /// AtLeastOnce = 1, /// /// Exactly-once delivery: Deduplication guarantees no duplicates. /// Slowest option due to deduplication checks. Use for critical operations. /// ExactlyOnce = 2 }