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
{{ message }}
This repository was archived by the owner on Aug 15, 2024. It is now read-only.
When a message or stream is deleted, a message is deleted to the $deleted stream. The primary purpose of this is to allow subscribers or (a future) mirroring capability to handle that. The current design retains these deleted messages indefinitely where as for most cases, one would only want to retain the for a period of time.
Throwing out some thoughts:
Leverage the metadata infra to be able to set a maxAge and/or maxLength. Currently, the API does not allow direct manipulation of streams whose Id starts with $ by design. I'd like to keep this in place so this approach would require an explicit API. The potential slight problem is that for maxAge the purge happens on read so a ReadAllStreamForwards(null...) would be required to actually remove the $deleted stream messages. If that never happens... MaxCount is handled on append, so that is not a concern.
Expose a specific operation such as PurgeDeleted(TimeSpan olderThan) that the host application can invoke on it's own schedule. Should this have it's own implementation or underneath just reads the $deleted stream and let the MaxAge purge do it's thing?
When a message or stream is deleted, a message is deleted to the $deleted stream. The primary purpose of this is to allow subscribers or (a future) mirroring capability to handle that. The current design retains these deleted messages indefinitely where as for most cases, one would only want to retain the for a period of time.
Throwing out some thoughts:
Leverage the metadata infra to be able to set a
maxAgeand/ormaxLength. Currently, the API does not allow direct manipulation of streams whose Id starts with$by design. I'd like to keep this in place so this approach would require an explicit API. The potential slight problem is that formaxAgethe purge happens on read so aReadAllStreamForwards(null...)would be required to actually remove the$deletedstream messages. If that never happens...MaxCountis handled on append, so that is not a concern.Expose a specific operation such as
PurgeDeleted(TimeSpan olderThan)that the host application can invoke on it's own schedule. Should this have it's own implementation or underneath just reads the $deleted stream and let theMaxAgepurge do it's thing?