The Assembled Code
Here is the complete setup to initialize a test application, dispatch commands to the write path, and update and query the read model:Running the Verification
To run this in your terminal, add it to yoursrc/main.rs file or a local integration test binary and run:
Summary of the Tutorial
Congratulations! You have successfully built:- An aggregate root consistency boundary representing a bank account.
- A write-side pipeline using an in-memory event ledger that reconstitutes state and enforces invariants.
- A read-side projection that updates customized materialized views from committed event streams.