Is there any way to “subscribe” to stream deletion? I can track stream creation by subscribing to $streams (or $category-x) stream, but is there something symmetrical for deletion?
– SR
Is there any way to “subscribe” to stream deletion? I can track stream creation by subscribing to $streams (or $category-x) stream, but is there something symmetrical for deletion?
– SR
Sorry, there isn’t a way to do that. What’s the use case, perhaps there’s another way to approach this?
(Adapted to public) use case is something like that: I have a document
that in its lifetime is categorized by several so-called traits. Every
categorization is an event in document stream, and I back-reference
document from trait stream via subscription (e.g. on each
categorization event in document stream a "documentAdded" event is
emitted to trait stream). When the document is deleted (and due to
compliance reasons it's deleted entirely, with its stream), I want to
delete all the references to it from trait stream.
Of course I can firstly emit a "delete" event to document stream, and
then, from subscription, delete the stream itself, but that seems...
awkward.
-- SR
This is actually the best way of doing it as we internally have no idea where your consumers may be (think 10k messages behind then we delete the stream)