I am new to event sourcing and i am bit confused about Rebuilding the Objects from the event Stream.
I believe we need to run load all the events happened from the chronological order to rebuild the object state. So for Example
If i have a Object Called customer.
Public class Customer
{
public void Correctname(string firstName,string lastName)
{
CustomerNameChanged(new nameChangedEvent(firstName,lastName);
}
}
If the Customer changed the Name twice we will be storing the event twice in the eventlog and when i rebuild the events to object i will get the event twice . Is it needed to take the previous event or archieve the events so that we dont rerun the last event again