I have an aggregate (call it B) whose initial state is a copy of the state of another aggregate (call it A) at the moment of B’s creation. Now to build the initial state of aggregate B (using event sourcing), I need all the events that have been applied on the aggregate A (till the time of B’s initialisation) to be applied on B as well.
How can I replay events of aggregate A on aggregate B to build its state? Does Axon provide any out-of-the-box solution? Or is there any workaround to this problem?