I'm not really sure where to post, since it's not really an issue, but more a lack of understanding :laughing:
I have a service, that receives two different event types from different sources. In my example it's users and todos. My goal is to create is a projection that contains all info from the todo and the assigned users.
Here a my models (simplified for testing purpose)
User Event
record UserCreated(Guid Id, string FirstName, string LastName)
Todo Event
record TodoCreated(Guid Id, string Description, Guid CreatedBy, Guid ChangedBy)
My projection should look something like this
record Todo(Guid Id, string Description, User CreatedBy, User ChangedBy)
Due to the nature of event driven, when processing the Todo event, it is not guaranteed that the User already exists.
Additionally in the future, I want to update the projection if a user changes.
Hey,
I'm not really sure where to post, since it's not really an issue, but more a lack of understanding :laughing:
I have a service, that receives two different event types from different sources. In my example it's users and todos. My goal is to create is a projection that contains all info from the todo and the assigned users.
Here a my models (simplified for testing purpose)
User Event
record UserCreated(Guid Id, string FirstName, string LastName)
Todo Event
record TodoCreated(Guid Id, string Description, Guid CreatedBy, Guid ChangedBy)
My projection should look something like this
record Todo(Guid Id, string Description, User CreatedBy, User ChangedBy)
Due to the nature of event driven, when processing the Todo event, it is not guaranteed that the User already exists. Additionally in the future, I want to update the projection if a user changes.
I've played around the MultiStreamProjection and Custom Grouping, but not really get a sufficient solution. Sample repo can be found here: https://github.com/NQuirmbach/marten-race-conditions/tree/setup-event-consumer
Hope you could help me here :smile: