We have an application doing file management where a file is a collection of a lot of different subconcepts.
Because a file and its related subconcepts can get really big in terms of number of events we:
- modelled each subconcept as an aggregate
- modelled file itself as an aggregate which just contains some basic overall data.
We have some services that consume these events using tracking event processors handling events in parallel.
The easiest for those services would be to handle all events related to one specific file and its subconcepts in order of insertion into the event store.
Is the best way to do this writing a custom SequencingPolicy?
If the answer to the above question is yes what is the best way to add the id of the file on each event of a subconcept so that we can correlate on that? Do we need to add it as field on the event or is there metadata where we can store it that is accessible in a SequencingPolicy?
For the moment the id of the file is only inside the data of the first event of each subconcept.