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