prooph/pdo-event-store

Always update the projections position

hvanoch opened this issue · 0 comments

Now the projection position is only updated when it actually has an event.
That means when stopping the projection and running it again, all events will be fetched from previous position to "now".

The real reason I want this to be updated is so I can update the read model synchronised, and not async with the write model.
I created a plugin that when ever a write happens (event store "appendTo" or "create" event) waits and poll for the position to be the same as the key from last event created. That way I know that the projection has the current state applied of these newly created events.

As you see, if the position is never updated for projections where the event was never used for it hangs.