oura icon indicating copy to clipboard operation
oura copied to clipboard

add capped streams support to redis stream sink

Open pyromaniac3010 opened this issue 1 year ago • 0 comments

It would be really nice to support the capped streams aka "MAXLEN ~ <STREAMENTRYS>" function of https://redis.io/commands/xadd/ via a new config option to automatically evict old streams. I suggest something like "stream_maxitems" as config option:

type = "Redis"
redis_server = "redis://localhost:6379"
stream_name = "mystream"
stream_maxitems = "10000"

This would prevent users to explicitly call XTRIM (https://redis.io/commands/xtrim/) from a separate process regularly to prevent redis memory to overflow.

pyromaniac3010 avatar Oct 12 '22 13:10 pyromaniac3010