4

We are looking at building a new system based on event sourcing. Mainly for it's logging and integration benefits and because the business knows the 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 has the aggregates current state stored in it. Pretty standard stuff - but we have no history so we just have the current state of play for all aggregates.

What is the standard approach to handle this situation?

  1. A single event that initializes the aggregate to its current state
  2. Map its current state to a serious of events and run those?
  3. Other approach? E.g. Its not a good idea

Anyone got any advice?

4

1 に答える 1

2

1.に行くことをお勧めします。たとえばCustomerInitializedFromLegacyDB、既存のデータをペイロードとして持つイベントを保存します。

于 2014-11-06T21:12:31.037 に答える