streamstack icon indicating copy to clipboard operation
streamstack copied to clipboard

[feature] Kafka-style retention duration for streams

Open addu390 opened this issue 3 months ago • 7 comments

There's no time-based retention right now. Data in a stream sticks around until someone trims it explicitly.

Kafka's retention.ms model is well understood and covers most use cases, so let's do the same:

  • A per-stream (or per-prefix) retention duration config
  • A background job that trims data past the retention window
  • Trimmed ranges get cleaned up from object storage so we actually stop paying for them

Open questions:

  • Default retention: infinite (current behavior) or something sane like 3-30 days?
  • Do we also want size-based retention (retention.bytes) while we're in here?
  • How does retention interact with the Iceberg export #11 feature, we probably shouldn't trim data that hasn't been exported yet

addu390 avatar Aug 18 '26 04:08 addu390

I would love to work on this one if it would be ok for a rust n00b!

mchauhan3 avatar Sep 04 '26 03:09 mchauhan3

@mchauhan3 Absolutely! assigned the issue to you. Feel free to ask any questions or collaborate on the design decisions. And here to help with any Rust related gotchas that may come along the way.

addu390 avatar Sep 04 '26 03:09 addu390

Hi @mchauhan3, no rush, but did you get a chance to work on this issue?

addu390 avatar Sep 15 '26 04:09 addu390

Hi @addu390 , sorry to lag on it -- I have been working on it, albeit very very slowly. Happy to fork it over if it's needed sooner and pick up something else!

mchauhan3 avatar Sep 15 '26 04:09 mchauhan3

@mchauhan3 No worries at all, just checking in.

addu390 avatar Sep 15 '26 05:09 addu390

Hi @addu390, sorry I am going to give this one up, I haven't been able to give it the time it deserves. Hopefully, I will have some time soon and will try pick up something else.

mchauhan3 avatar Oct 23 '26 18:10 mchauhan3

Hi @mchauhan3 No worries, thanks for getting back. I have re-assigned the issue.

addu390 avatar Oct 24 '26 18:10 addu390