Hello,
I have events about Transactions that are first Received, then Confirmed, the Received event types can be removed after 7 days to save storage space, the Confirmed needs to stay forever.
To implement this I have two streams:
- TxRecv $maxAge: 7 days
- TxConf
Both of these write to Streams through a Projection:
fromStream(‘TxRecv’)
.when({
$any: function(s, ev) {
linkTo(ev.metadata.address, ev)
}
})
fromStream(‘TxConf’)
.when({
$any: function(s, ev) {
linkTo(ev.metadata.address, ev)
}
})
``
This means I can subscribe to one Stream, the Address from the metadata to receive all events about Transactions to the Address.
However when I attempt to run this, I get the following: The ‘’ projection faulted due to ‘Multiple projections emitting to the same stream detected.’
I’m not sure why this would be an issue, as I can write to the same Stream with many different EventStore clients.
If I cannot do this, can I set a $maxAge on an individual EventData for it to be removed the from the system after the 7 day timeline?
Many thanks for any assistance.
James