-
-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Event sourced projection event is not correctly handled in complex flows #104
Comments
Hey, Can you provide PR with test case (you may copy paste your example into |
Hello @unixslayer, I got another use case that can be even more problematic : if the event sourced aggregate records 2 events and both events are listened by the same projection, the projection will fail in the same manner. Hope that helps, I may try to add a test for that |
This is now fixed with 1.87.0. |
@jlabedo one thing was changed in your test case during debugging. What I did was change the behavior of Saga so that it won't send a command before returning |
Ecotone version(s) affected: 1.79.0
Description
In the context of 2 event sourced aggregates, both aggregates having projections on their stream,
Then, with a synchronous flow being command (Agg1_id1)=>Event(Agg2_id1)=>Command(Agg1_id1), the events from Agg2 handled in its projection are not handled in the context of a projection handler, but as a "common" event handler.
This breaks the projection, as the projection state is not updated and persisted, and the projection is not initialized.
There is no bug in the case of different ids on Agg1: (Agg1_id1)=>Event(Agg2_id1)=>Command(Agg1_id2) works as expected
How to reproduce
See modified EventSourcing example in:
https://github.com/jlabedo/ecotone-dev/tree/failing-es-projection/quickstart-examples/EventSourcing
The example show that
SagaProjection
is not initialized when we create a product with Id=3Context
The case is pretty awkward, and we found it in a badly designed use case. We fixed it by redesigning correctly our aggregates
The text was updated successfully, but these errors were encountered: