Skip to content
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

Initial implementation of per-key-TTL for KV #703

Draft
wants to merge 5 commits into
base: server-2.11-features
Choose a base branch
from

Conversation

stebet
Copy link
Collaborator

@stebet stebet commented Jan 7, 2025

Note

  • Adds support to set the AllowMsgTTL flag for KV streams
  • Adds a Timestamp ttl optional parameter to the PutAsync<T> method on INatsKVStore
    • Note that this does break API backwards compatibility if users are using their own serializers, but that's seems to be how it's done in Go client, so it's up to you if you want to create a separate overload for each method that can accept a TTL value
  • Added a single test to test the TTL functionality. This currently requires the tests to have access to the latest nightly binary

TODO:

  • More exhaustive tests
  • Add support to the CreateAsync/UpdateAsync API methods

see also ADR-43

@stebet stebet requested a review from mtmk January 7, 2025 15:55
@stebet stebet force-pushed the message-ttl branch 3 times, most recently from 74d3cf9 to d234060 Compare January 8, 2025 16:15
@mtmk mtmk added this to the server 2.11 milestone Jan 27, 2025
@mtmk mtmk changed the base branch from main to server-2.11-features February 3, 2025 09:06
@mtmk
Copy link
Collaborator

mtmk commented Feb 4, 2025

we're hoping to merge this into server 2.11 branch before server release #733

@jodydonetti
Copy link

Can't wait for per-key TTL, it will allow usage of NATS in FusionCache too.

Thanks for all the hard work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants