Replies: 1 comment 2 replies
-
Normally, event-sourced model focus on a particular business domain. It's not frequent that an actual business has an "Undo" operation. For example, how can you undo making a hotel reservation? You'd actually need to cancel it instead. A reservation cancellation is represented by an explicit command, which emits an explicit event, and it is not unconditional. Like, if the reservation is non-refundable, you would need to get some sort of confirmation as there will be no refund. I am pretty sceptical about implementing such a functionality "in tech" like you did, to be honest. Maybe, an example of the actual use case would make things a bit clearer. |
Beta Was this translation helpful? Give feedback.
-
Hi there,
we are using Eventuous for quite a while now and it works like a charm. Now the customer came up with the idea to add Undo and Redo. We solved it partially by implementing our own derivate of the EsdbEventStore with access to the stream's Metadata and set a custom attribute where the last position is. So when we retrieve our aggregate it only reads up to that position (e.g. 2x undo -> end of stream-2).
That works quite well also incombination with truncation when the user wants to add something new.
But we can't wrap our head around the projections. Because they are base on catch up subscriptions. Is there a built in way to somehow resubscribe selective aggregates?
Maybe our approach is wrong, wouldn't rule that out, so if you have something clever in mind let me know ;)
Cheers
Beta Was this translation helpful? Give feedback.
All reactions