Java Axon migration from 2.4.2 version to 4.0.3

Nestor Milyaev :

I'm trying to migrate an app that uses Axon framework v.2.4.2 jumping two major versions to 4.0.3.- possibly in 2 steps (2->3, 3->4).

The app also uses Spring.

Our application uses Axon in pretty simple way - just using Aggregates, EventHandlers and @EventSourcingHandlers.

How do I go about doing it?

I've found the following post: Is there any specific way for Axon migration from 2.4.3 version to 3.1.1, and dribs and drabs of posts on the Axon forum https://groups.google.com/forum/#!searchin/axonframework/upgrade%7Csort:date.

Sadly, most axon migration guides and documentation referenced in these sources is obsolete or have been removed.

Are there any migration guides still alive out there? Also, which approach is better - migrating in one go or in two steps? Could someone with Axon experience please share their sources or insights?

Steven :

I have updated the broken link in the the post you're referring to as the migration help from 2 to 3. I feel most of what's in there is still accurate, so would you mind specifying which bits in there do not map to your situation?

What I think is key in your situation is to ensure that your Axon-2 events will be able to cope with the new format which was introduced in Axon 3. More specifically, the addition of the globalIndex. Point 6 of the referenced StackOverflow should still cover the solution to this.

What I can also point out is that the migration from 3 to 4 is a simpler one than from 2 to 3. The biggest changes which have been made between 3 and 4 is a thorough reordering of all our classes into different modules. As such, I think jumping from 2 to 4 would be a doable thing. If you want to have a look at the changes we made between 3 and 4, I'd like to refer you to this file. It contains all the changes which have been made when creating Axon 4.

So to summarize, I'd probably go for a direct jump from Axon 2 to 4, using the earlier mentioned 2-to-3 migration help and the 3-to-4 API changes document. And, if you have any specific question regarding the migration, do not hesitate to update your question and ask for a follow from my part!

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=160538&siteId=1