Versioning aggregate roots based on date time #483
Unanswered
stevewolfe555
asked this question in
Q&A
Replies: 1 comment 1 reply
-
Rebuilding projections is one thing, but reordering the events is another entirely. How out of order? Is there a threshold? Or if an event comes in with a timestamp from two years ago would you rebuild projections and try to put that event ahead of all the others in the last two years? I ask because if there is a threshold, and it's much shorter than two years (as I would expect), say 10 minutes? Then I would cache the events with a ten minute lifespan (from the time of their timestamp) and flush them to the store in the correct order every say ... 10 minutes. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm working on their system that receives events delayed and out of time but they all come with a timestamp.
I need (I think) the aggregate root to be rebuilt based on this timestamp so I have extended the Should be stored and the stored event repository.
This however leaves me an issue that when you try to rebuild an aggregate root it's still trying to get the version.
I was trying to remove the version IDs as these will no longer be accurate.
I was looking to replace the aggregate root class but thought I would check to see if anyone has had an experience with the best way to deal with this.
My business logic will have to understand that if an event comes in out of order it will have to rebuild projections but I'm still trying to keep the stored events table orderable so that when it's retrieved on the aggregate root everything is correct.
Beta Was this translation helpful? Give feedback.
All reactions