Joseph Doherty
7eb06c8ac5
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.
2026-02-24 20:17:35 -05:00
Joseph Doherty
2c9683e7aa
feat: upgrade JetStreamService to lifecycle orchestrator
...
Implements enableJetStream() semantics from golang/nats-server/server/jetstream.go:414-523.
- JetStreamService.StartAsync(): validates config, creates store directory
(including nested paths via Directory.CreateDirectory), registers all
$JS.API.> subjects, logs startup stats; idempotent on double-start
- JetStreamService.DisposeAsync(): clears registered subjects, marks not running
- New properties: RegisteredApiSubjects, MaxStreams, MaxConsumers, MaxMemory, MaxStore
- JetStreamOptions: adds MaxStreams and MaxConsumers limits (0 = unlimited)
- FileStoreConfig: removes duplicate StoreCipher/StoreCompression enum declarations
now that AeadEncryptor.cs owns them; updates defaults to NoCipher/NoCompression
- FileStoreOptions/FileStore: align enum member names with AeadEncryptor.cs
(NoCipher, NoCompression, S2Compression) to fix cross-task naming conflict
- 13 new tests in JetStreamServiceOrchestrationTests covering all lifecycle paths
2026-02-24 06:03:46 -05:00