Created
October 29, 2020 10:43
-
-
Save webdevilopers/ef075c442adac56865533b2feee798ed to your computer and use it in GitHub Desktop.
Prooph Event Stream Projection from merged streams event ordering
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php |
We rewrote the event stream ordered by "created_at" and re-setting the no
. The projection now looks as expected.
If I see this correctly then writing a projection fromStreams
does not work if one of the streams has inconsistent ordering between no
and created_at
. Though this should not happen when correctly using the lib. But the mentioned sort does not seem to solve it.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
No #2068 is the "Person Stream" "PersonAdded" Event created at "2020-02-10 12:53:07.000000" and no #4580 is the related "Contract Stream" "ContractEntered" Event created at "2020-02-10 12:53:44.000000".
Code: $projector->fromStreams('person_stream', 'service_contract_stream')...
The stream order itself is correct -
_d2588481fc670c20e905cc363144708b697ce254
= "Person Stream" at 0 and_c1670165c005fb3d12618b6eb4d4c71cf1767117
= "Contract Stream" at 1 -