-
-
Notifications
You must be signed in to change notification settings - Fork 445
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
Load aggregate at specific version #906
Comments
Hi @Athosone Just to make sure that I fully understand, you want to read the aggregate as it looked at a specific point in time? If so, then no, there isn't anything currently in the framework. But sounds like a useful thing to have. I looked into the current available APIs and doing it yourself doesn't seem complicated. Read the events from the aggregate you are interested in via the |
Thanks for the quick reply Ok then I'll experiment with this, we could contribute eventually if that's something that may interest you? |
As for the snapshot I would need to implement a custom snapshot store which persist a new snapshot of the aggregate instead of updating the current one right ? using the timestamp / id as index |
I have a similar need, so if it's something you want in EventFlow, I can fork and PR it for you. I would also be interested in helping contribute to the project, we are ramping up to use it here at my company. So let me know if you'd be interested in that as well. |
Something like // Load events representing version
var domainEvents = IEventStore.LoadEventsAsync(id)
domainEvents = domainEvents.Where(e => e.AggregateSequenceNumber < selected version).ToList()
// Apply to empty aggregate
var aggregate = IAggregateFactory.CreateNewAggregateAsync(id)
aggregate.ApplyEvents(domainEvents) |
Hello there! We hope you are doing well. We noticed that this issue has not seen any activity in the past 90 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, |
Hello there! We hope you are doing well. We noticed that this issue has not seen any activity in the past 90 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, |
Will make it respect the stale exempt |
Hi !
In our company we are starting to use Eventflow.
We have a use case where we want to query the state of our aggregate between date range.
So far I did not see any out of the box way to do that. Did I miss something or did not understand a concept?
I think that I should use the event store and load all events for my aggregate then replay them until the desired date however I can foresee performance issue at some point.
This is where I may use snapshot,
However I did not see a way to query a snapshot from a certain date...
Do you have any advice concerning this use case?
Regards
Ayrton
The text was updated successfully, but these errors were encountered: