-
Notifications
You must be signed in to change notification settings - Fork 34
feat(kv,jetstream)Add support for per-message TTLs in KV and JetStream #281
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Introduced `markerTTL` and per-message TTL options, allowing fine-grained control over retention policies. Updated KV methods, types, and tests to support these features, ensuring compatibility with streams enabling `allow_msg_ttl`. Signed-off-by: Alberto Ricart <[email protected]>
Signed-off-by: Alberto Ricart <[email protected]>
…t server seems to not honor the request, but doesn't return an error. Signed-off-by: Alberto Ricart <[email protected]>
Signed-off-by: Alberto Ricart <[email protected]>
…header Signed-off-by: Alberto Ricart <[email protected]>
Signed-off-by: Alberto Ricart <[email protected]>
…KvJsMsgEntryImpl Signed-off-by: Alberto Ricart <[email protected]>
piotrpio
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
| h.set(PubHeaders.ExpectedLastSubjectSequenceHdr, `${opts.previousSeq}`); | ||
| } | ||
| if (opts.ttl) { | ||
| const h = o.headers || headers(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If o.headers isn't set, the newly created headers won't be attached to o on line 626, right?
|
Can you do something so that it become available in nats.js package? It merged a couple of months ago, but still impossible to use it |
Introduced
markerTTLand per-message TTL options, allowing fine-grained control over retention policies. Updated KV methods, types, and tests to support these features, ensuring compatibility with streams enablingallow_msg_ttl.