How do you handle historical aggregated data when the system starts up with new events?

We are looking at creating a new system based on the use of event sources. Mainly for its use in the field of logging and integration, but also because the business knows that data is very valuable but doesn't really know what it wants to do with it.

However, although the system is new, there is currently an existing database that stores the current state of the units. Pretty standard stuff, but we don't have a story, so we have the current state of the game for all aggregates.

What is the standard approach for handling this situation?

  • The only event that initializes the aggregate to its current state
  • Correlate the current state with serious events and trigger them?
  • Another approach? For example. This is not a good idea.

Anyone got any advice?

+3


source to share


1 answer


I would recommend going to 1. for example. storing an event CustomerInitializedFromLegacyDB

that has existing data as a payload.



+2


source







All Articles