feat: add FileStore tombstone, TTL & consumer state persistence (Task 2)

Port Go filestore tombstone/deletion tests, consumer state encode/decode,
consumer file store persistence, and message TTL enforcement. Adds
ConsumerStateCodec and ConsumerFileStore implementations.

17 new tests ported from filestore_test.go.
This commit is contained in:
Joseph Doherty
2026-02-24 20:17:35 -05:00
parent a9967d3077
commit 7eb06c8ac5
6 changed files with 1557 additions and 7 deletions

View File

@@ -22,4 +22,8 @@ public sealed class FileStoreOptions
// Enums are defined in AeadEncryptor.cs.
public StoreCompression Compression { get; set; } = StoreCompression.NoCompression;
public StoreCipher Cipher { get; set; } = StoreCipher.NoCipher;
// Go: StreamConfig.MaxMsgsPer — maximum messages per subject (1 = keep last per subject).
// Reference: golang/nats-server/server/filestore.go — per-subject message limits.
public int MaxMsgsPerSubject { get; set; }
}