eventflow / EventFlow

Async/await first CQRS+ES and DDD framework for .NET
https://geteventflow.net
Other
2.39k stars 445 forks source link

Event rollback during Saga failure? #971

Closed gutsdream closed 1 year ago

gutsdream commented 1 year ago

I've looked through the documentation and source material but couldn't find any information regarding this; sorry if I've missed something obvious.

I'm wondering if there's a way to rollback events and read model updates upon Saga failure (or to only commit them upon completion).

If this isn't supported functionality - what's the best way to support something where there's one transaction that spans multiple aggregates and domain events? Using a single Command/ CommandHandler?

Also I just wanted to say thanks for creating this framework, it's awesome!

gutsdream commented 1 year ago

I've done some more research into this in the meantime and have come across this article, which has shed some light for me: https://www.zilverline.com/blog/event-sourcing-invariants-spanning-multiple-aggregates

Would this be the right direction to go in rather than trying to force an atomic style into the framework?

jutimor commented 1 year ago

Good article and i agree with it. Events are immutable and should never disappear(except in clean of old data) . The only "good" way to cancel something is a CancelEvent that keep track that somethings change and why.

github-actions[bot] commented 1 year ago

Hello there!

We hope you are doing well. We noticed that this issue has not seen any activity in the past 90 days. We consider this issue to be stale and will be closing it within the next seven days.

If you still require assistance with this issue, please feel free to reopen it or create a new issue.

Thank you for your understanding and cooperation.

Best regards, EventFlow

github-actions[bot] commented 1 year ago

Hello there!

This issue has been closed due to inactivity for seven days. If you believe this issue still needs attention, please feel free to open a new issue or comment on this one to request its reopening.

Thank you for your contribution to this repository.

Best regards, EventFlow