nats: a tool purges a stream's messages below a sequence

A build seat's work queue (SEAT_NODE_BUILD_GO) held about 370 asks of
pipelines nobody waits for, ahead of the one pipeline wanted, and no tool
could empty it short of removing the stream. nats_stream_purge removes the
messages below a given sequence, keeping the rest, the stream and its
consumers; it needs why, reads first, offers dry_run, refuses a purge past
the stream's end and the module-kept data nats_drop owns, and says
stream-purged as its audit event, like the three removal tools.
This commit is contained in:
2026-11-16 22:07:18 +01:00
parent e87c6cd3b6
commit 4f9f307eaf
2 changed files with 92 additions and 1 deletions
+2
View File
@@ -57,6 +57,7 @@
"consumer-removed",
"bucket-keys-removed",
"stream-removed",
"stream-purged",
"bucket-expiry-set",
"snapshot-restored"
],
@@ -171,6 +172,7 @@
"nats_consumer_remove",
"nats_bucket_remove",
"nats_stream_remove",
"nats_stream_purge",
"nats_bucket_expiry",
"nats_history",
"nats_create",