We have a system that produces events we write to eventstore, basically a stream for each “user”. We use projections to sort those events into different streams for accessing them in a sane way, as suggested in The cost of creating a stream.
Now we would like to use scavenging (events older than a month are of no interest to us) to save storage. For that we would have to set $maxAge in the stream metadata. Now to the question: Is ist enough to set $maxAge on the stream we write the events to, and when they are ready to be deleted with scavenging, they will also be deleted from the streams we created with the projections? Or would we have to set $maxAge on every stream the event is put in through projections as well for the events to be deleted?
If so, is it possible to set stream metadata in a simple way directly in the projection definition code (couldn’t find an example for that)? Or is ist somehow possible to set a default $maxAge for all streams created in the future?
Thanks for your support.