36 lines
1.1 KiB
C#
36 lines
1.1 KiB
C#
namespace Svrnty.CQRS.Events.ConsumerGroups.Abstractions;
|
|
|
|
/// <summary>
|
|
/// Strategy for committing consumer offsets.
|
|
/// </summary>
|
|
public enum OffsetCommitStrategy
|
|
{
|
|
/// <summary>
|
|
/// Manual commit via CommitOffsetAsync.
|
|
/// Provides maximum control but requires explicit offset management.
|
|
/// Use when you need precise control over when offsets are committed.
|
|
/// </summary>
|
|
Manual = 0,
|
|
|
|
/// <summary>
|
|
/// Auto-commit after each event is yielded.
|
|
/// Provides strong at-least-once delivery guarantees but higher overhead.
|
|
/// Best for critical events where you cannot afford to reprocess.
|
|
/// </summary>
|
|
AfterEach = 1,
|
|
|
|
/// <summary>
|
|
/// Auto-commit after each batch of events.
|
|
/// Balances delivery guarantees with performance.
|
|
/// Best for most use cases.
|
|
/// </summary>
|
|
AfterBatch = 2,
|
|
|
|
/// <summary>
|
|
/// Periodic auto-commit at configured intervals.
|
|
/// Lowest overhead but may result in more duplicate processing on failure.
|
|
/// Best for high-throughput scenarios where some duplication is acceptable.
|
|
/// </summary>
|
|
Periodic = 3
|
|
}
|