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

Enhancement: Peristance / ttl no limit for redis streams #3609

Open
darekmeco opened this issue Jul 4, 2024 · 1 comment
Open

Enhancement: Peristance / ttl no limit for redis streams #3609

darekmeco opened this issue Jul 4, 2024 · 1 comment
Labels
Enhancement This is a new feature or request

Comments

@darekmeco
Copy link

darekmeco commented Jul 4, 2024

Summary

Could you add the ability to set an unlimited TTL (time-to-live) to the RedisChannelsStreamBackend, so that it’s possible to retrieve the history for the entire duration of the stream’s existence?

Basic Example

            plugins=[
                ChannelsPlugin(
                    arbitrary_channels_allowed=True,
                    backend=RedisChannelsStreamBackend(redis=client, stream_ttl=-1),
                )
            ],
PERSIST  LITESTAR_CHANNELS_CHANNEL1

Drawbacks and Impact

No response

Unresolved questions

No response


Note

While we are open for sponsoring on GitHub Sponsors and
OpenCollective, we also utilize Polar.sh to engage in pledge-based sponsorship.

Check out all issues funded or available for funding on our Polar.sh dashboard

  • If you would like to see an issue prioritized, make a pledge towards it!
  • We receive the pledge once the issue is completed & verified
  • This, along with engagement in the community, helps us know which features are a priority to our users.
Fund with Polar
@darekmeco darekmeco added the Enhancement This is a new feature or request label Jul 4, 2024
@provinzkraut
Copy link
Member

Could you explain your use case for this?

If you don't set any TTL on the stream, you'll have to clean it up manually at some point, otherwise your redis will run out of memory eventually, which is why a default TTL has been added here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement This is a new feature or request
Projects
None yet
Development

No branches or pull requests

2 participants