CQRS - how to handle new report tables (or: how to import ALL history from the event store)

前端 未结 3 1761
心在旅途
心在旅途 2021-02-03 10:30

I\'ve studied some CQRS sample implementations (Java / .Net) which use event sourcing as the event store and a simple (No)SQL stores as the \'report store\'.

Looks all g

3条回答
  •  面向向阳花
    2021-02-03 10:49

    You re-run the handler on the existing event log (eg you play the old events through the new event handler)

    Consider you example ... you have a ton of PhoneCallLoggedEvents in your event log. Take your new Handles and play all the old events through it. It is then like it has always been running and will just continue to process any new events that arrive.

    Cheers,

    Greg

提交回复
热议问题