You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Hi,
It would be nice to have the possibility to issue a command to the server in order to request expiration of Messages from a Stream.
Use-cases (in no particular order):
when streams are used for event-sourcing, messages produced before a snapshot could be moved to cold storage
custom expiry rules could be implemented in external software
on-demand expiry of messages is useful if there is some manual operation to perform before the cleanup (like compliance reporting or archival tasks)
the stream could be used as a write-ahead-log and be "truncated" when all the "replicas" are aligned (like PostgreSQL does)
Any thoughts?
Thanks.
Describe the solution you'd like
I cannot propose an implementation because I don't know the codebase or the protocol.
It probably would be a variation of the current expiry logic but operating on the offset/id instead of the timestamp?
Describe alternatives you've considered
These use-cases are not implementable with the current available policies because they are based on TIME or SIZE of the messages and that cannot be known beforehand in many cases.
While those are useful as a failsafe, if you prioritize uptime, there are domains in which is preferrable to crash the application than losing data.
Doing "rotation" of streams by: creating a new one, copying the data to keep and deleting he old one, seems rather dangerous and wasteful.
Additional context
An example of implementation is Redis's XTRIM(MINID=N) command.
While this has nothing to do with Rabbit, I'm linking it just for reference.
This discussion was converted from issue #14412 on August 21, 2025 14:24.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Is your feature request related to a problem? Please describe.
Hi,
It would be nice to have the possibility to issue a command to the server in order to request expiration of Messages from a Stream.
Use-cases (in no particular order):
Any thoughts?
Thanks.
Describe the solution you'd like
I cannot propose an implementation because I don't know the codebase or the protocol.
It probably would be a variation of the current expiry logic but operating on the offset/id instead of the timestamp?
Describe alternatives you've considered
These use-cases are not implementable with the current available policies because they are based on TIME or SIZE of the messages and that cannot be known beforehand in many cases.
While those are useful as a failsafe, if you prioritize uptime, there are domains in which is preferrable to crash the application than losing data.
Doing "rotation" of streams by: creating a new one, copying the data to keep and deleting he old one, seems rather dangerous and wasteful.
Additional context
An example of implementation is Redis's XTRIM(MINID=N) command.
While this has nothing to do with Rabbit, I'm linking it just for reference.
Beta Was this translation helpful? Give feedback.
All reactions