Projectors stops working after bulk updates
tombrouwer opened this issue · comments
Hi!
We implemented your package to store events and project them. It's working fine until we do multiple updates on the same model (different instances). It will stop project the events. Die projector status is set to a event ID which is not the last one. We don't get any errors or exceptions. It stops projecting. Three projectors (from 10) has the status for the "has_received_all_events" at false. What can be te problem here?
Are you using a queue to handle the events? If not, try with that. Horizon works great with this package
Hi fgilio,
Thanks for the suggestions. I will take a look at queues. But te main reason why we didn't used this before is that we need instant feedback on the most of our functionallities. and I am very curious why it suddenly stops working without any error.
If a lot of events are happening concurrently projectors may fall behind. Here's some more info on that: https://docs.spatie.be/laravel-event-projector/v1/basic-usage/making-sure-events-get-handled-in-the-right-order
Like @fgilio mentioned, queuing can solve this problem. Take a look at the docs, and let us know it that helps you.