read-model
and write-model
, there needs to be some process for syncing the stores. In our case, making sure that changes made in the write-model
are reflected in the state of the read-model
.read-model
subscribes to updates from the write-model
so anytime changes are made, they are synced in near-real-time.404 not found
error. This is because the TodoAdded
event didn't have time to propagate to the read-model
. If we wait a second and then run getById
, it should work.