Fork me on GitHub

@gardnervickers What you're saying is that aggregation init should be able to rely on external context? I'm not sure they are built for that though it would make my scenario more comfortable to implement. You asked what's preventing using aggregation init to load the external state as seed, and the answer is you don't have external context params in aggregation init (i should check this actually) and you don't know which group you are initializing (and group determines which state you need).


This is one of the final things I need to figure out before I can use onyx for CQRS. How to initialize an aggregation with existing state when the first relevant segment arrives.


@hugesandwich Are you creating a job for each configuration in your application? Perhaps my aggregations should be whole jobs instead.


@michaeldrogalis @lucasbradstreet Can jobs be used for one-off things like constructing an initial state? Can I have thousands of throwaway jobs like these, triggered from time to time and shut down when finished? Or even act as a microservice/actor, e.g a job for each user of the application, a job per shopping cart etc.