-
Notifications
You must be signed in to change notification settings - Fork 147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
using delete_stream #269
Comments
You should not directly access or modify the event store in the aggregate's What you can do instead is:
|
Thank you for the fast response! The first option is the one we will go with. We already evaluated the other two and came to the conclusion, that the first is the best for us. We just got stuck in the details. |
hi,
The problem
I have a very private aggregate, that needs to erase all its events from the eventstore, after it has been deleted.
But I wanted to keep the deleted event itself, so that all projections are guaranteed to receive the deleted event and can erase the according private data too.
So I did something like this:
Expected:
When I send the delete command:
Actual behaviour:
:ok
is not returned fromdelete_stream
, but{:error, :stream_not_found}
I do not fully understand that. Is there a retry logic somewhere, so that a second try does yield the error?
What pattern was intended to be used here?
Should I use an event handler, that listens to the deleted event and then hard deletes the stream?
Is it guaranteed, that all handlers, that listen to this stream (or the
$all
stream), will receive this last event and can erase the private data from their projections?Or should I soft delete first and scale a hard delete for later?
The text was updated successfully, but these errors were encountered: