Hi all, I’m still getting my head around streams and whatnot, but I cannot work out the best solution to this problem:
We have a bunch of events with an “external id” - this could be used as a key to partition the stream into many other streams.
There is a special event, which has the “external id” property as well as the “internal id” property (which is produced after a process of matching external data with internal data - always a one to one mapping).
No other events have the “internal id”.
What I would like, is to be able to get (in a stream) all the events that relate to the “internal id”, even before the special event with the “internal id was added”. So for example:
6: GoalScored { ExternalId: 1 }
5: IdMatchSuccessfully { ExternalId: 1, InternalId: 123 }
4: GoalScored { ExternalId: 1 }
3: GoalScored { ExternalId: 2 }
2: GameStarted { ExternalId: 2 }
1: GameStarted { ExternalId: 1 }
I would like to get a stream that would return, for InternalId = 123 the following:
6: GoalScored { ExternalId: 1 }
5: IdMatchSuccessfully { ExternalId: 1, InternalId: 123 }
4: GoalScored { ExternalId: 1 }
1: GameStarted { ExternalId: 1 }
Is this possible? Do I achieve this by using links to other streams?
Cheers,
Chris