Transform Aggregate

Skip to first unread message

Denis Manig

Jul 14, 2020, 2:27:30 PM7/14/20
to Axon Framework Users
Hi Axon lovers,

sometimes it happens, that a decisssion for an aggregate was wrong and I want to delete or transfer properties from an aggregate. How can I practcally achive this, especially if I'm using snapshots?

Lets say, I have an UserAggregate and I made a wrong decsission to put VideoLikes in it ... Now I want an extra Aggregate for VideoLikes ... On UserAggregate I added a Snapshotter. What is the best way to remove the Likes from UserAggregate and put it into VideoLikeAggregate?


Steven van Beelen

Sep 16, 2020, 5:24:09 AM9/16/20
to Axon Framework Users
Hi Denis,

You essentially have the requirement to pull apart the aggregate event stream into two event streams.
Snapshots in this case isn't the big issue. Those can simply be removed and recreated when needed.
They are just a short term replacement to fasten load speed of the aggregate, so I wouldn't see any issue just dropping them.

Splitting up an Aggregate event stream is a different operation entirely however...
As it currently stands, Axon (neither Framework nor Server) does not provide any tools when it comes to pulling an Aggregate event stream apart into distinct aggregate streams.
This thus means you will have to write a one-off tool which does the exact operations you want to do.
Like, which event goes to which aggregate stream? What is the new identifier of this other stream? Do I need to make any additional event modification next to the aggregate identifier?

Trust me if I say we are debating how to implement this in a user friendly way.
For now though, it will require some handy work from your team, my apologies.
Lastly, if these events and the aggregates they stem from are not production data, I wouldn't bother with pulling them apart.
This opts for a simple "let's start from scratch approach".

Trusting this clarifies things for you Denis!


PS. It is important to note that this mailing list will be discontinued as specified in this thread.
Instead of this mailing list we have moved to use a forum style of communication, at
Hope to see you there!

You received this message because you are subscribed to the Google Groups "Axon Framework Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit
Reply all
Reply to author
0 new messages