Files
archie/internal
sam 36cf7c4cd4 fix(nats): bound the ARCHIE_REACTIONS stream by age
Review fix for PR #875. ARCHIE_REACTIONS is provisioned under LimitsPolicy,
which retains every message until a limit is reached. With no limit configured,
acknowledged reactions accumulated without bound and continuous traffic could
grow the stream until it exhausted disk.

nats.Config gains MaxAge *time.Duration, using the same pointer form as
Retention so "unset" (nil) is distinguishable from an explicit zero. It is
applied to the stream config only when set, so every existing caller keeps its
current behaviour.

ARCHIE_REACTIONS sets MaxAge = 24h. A reaction is a producer-only wake event
whose authoritative state is re-read at pass time, so a dropped reaction delays
work until the next poll (default 60s) rather than losing it; 24h tolerates a
consumer down for a full maintenance window and matches the package's existing
DefaultInactiveTTL.

ARCHIE_TASKS is deliberately left unbounded. It uses WorkQueuePolicy, which
discards a message on acknowledgement, so its size is bounded by outstanding
work; a limit there could discard a task that has not been delivered yet, which
is a worse failure than the disk risk. The table asserts that non-change.
2026-09-19 02:16:38 +10:00
..
2026-08-29 00:20:05 +10:00
2026-08-06 01:40:15 +10:00