I use prooph(https://github.com/prooph) so I have my write model, where I store events like below(aggregate table):
when I run projection in background using command:
php bin/console event-store:projection:run card_projection
I have read model like below:
In front of my background application I have rest API, where I create event:
CardWasAdded
through url:
POST /cards
and I receive code 201.
After that I refresh my list through url:
GET /cards
The issue is that sometimes this new event is not processed by projection. So the question is:
How to manage that issue?
My answer is not prooph specific, but here are some strategies you may use in any CQRS system:
With strategy 3 and 4 you may use some kind of server signaling - sockets or something like this. Your read model might be able to confirm it was updated.