Home

Awesome

Event sourcing example in Java

A simplified (in memory) example of Event Sourcing implementation in Java for banking domain. Repository is splitted into exercises adding step by step more functionality towards good design of event sourcing with CQRS. You can play around and try to implement exercises or You can check out solution branches.

Step 1 - In memory iplementation of event sourcing

alt tag

soultion

Step 1a (optional) - Unit of work pattern

soultion

Step 1b (optional) - Projections

soultion

Step 2 (optional) - Optimistic locking

soultion

Step 3 - new Aggregate extraction

alt tag

soultion

Step 4 - adding CQRS

alt tag

soultion

Step 5

soultion