我使用了prooph(https://github.com/prooph),所以我有了写模型,在其中存储了如下所示的事件(聚合表):
当我使用命令在后台运行投影时:
php bin/console event-store:projection:run card_projection
Run Code Online (Sandbox Code Playgroud)
我读过如下模型:
在后台应用程序的前面,我有rest API,在其中创建事件:
CardWasAdded
Run Code Online (Sandbox Code Playgroud)
通过网址:
POST /cards
Run Code Online (Sandbox Code Playgroud)
我收到代码201。
之后,我通过url刷新列表:
GET /cards
Run Code Online (Sandbox Code Playgroud)
问题在于,有时无法通过投影处理此新事件。所以问题是:
如何解决这个问题?