← Back to blog

The Great Legacy System Migration, Without the Crocodiles

A take on legacy system modernization from Allard Buijze’s Axoniq Conference keynote, “A new perspective on event sourcing for the other 95%”

Every year, huge herds of wildebeest cross the Mara River looking for greener grass. Not all of them make it to the other side.

A picture of that crossing ended up in my closing keynote at the Axoniq Conference 2026, because it looks a lot like what we ask of teams that maintain a legacy system: "Just migrate to something better." Nobody disputes that the grass is greener over there, but the river is full of crocodiles, and for most systems the crossing doesn't have a decent ROI.

This is the written version of that keynote, A New Perspective on Event Sourcing for the Other 95%. It’s about the systems that will never be rewritten, and how we can still give them the benefits of event sourcing. Axoniq Clarity does that by recording the decisions an existing brownfield system makes as business events, without changing the application, so you can modernize piece by piece instead of all at once.

A second 95%

In June 2026, I gave a keynote at the Event Modeling Conference in Munich titled "Event Sourcing for the other 95%". It was about the many developers who never adopted event sourcing because we made it too hard, and what those of us who already speak the language can do to lower that barrier.

While preparing for the Axoniq Conference, I realized there's a second 95%. My guess is that only about 5% of our time in software engineering goes into greenfield projects. The rest goes into existing legacy systems. Many of them are held together by workarounds that nobody remembers the reason for, but they run the business, and switching them off to build something new is not an option.

Almost everything we've built around event sourcing, Axon Framework included, assumes you get to start from scratch. Some teams have managed to move a massive old-school system onto it, and I have a lot of respect for them. But what do we have to offer the people who maintain the system that nobody dares to touch anymore?

The great migration

So far, our answer has mostly been some version of "just migrate." I started calling it the great migration, after the wildebeest. One of my slides summed up the offer quite well: just a few easy steps, performed over a decade, will probably get you there. Most of you, mostly there.

Not all wildebeest make it across, and neither do all projects. Some developers give up halfway and go looking for a greenfield project somewhere else, which, if you think about it, is exactly what the wildebeest are trying to do as well.

I don't think anyone would refuse the new system if it showed up for free. It's the journey that kills it. There are simply too many crocodiles in that river for the migration to have a decent return on investment.

Why this has become urgent

During his closing keynote at Axoniq Conference 2025, Travis Oliphant said that AI is going to change a lot of things, and that it's going to get messy. How messy depends on how quickly we adjust. Of course, I translated that into "it will get messy unless you use Axon," but that might just be me.

AI agents are starting to act on our systems, and they need things that most legacy systems can't give them. As I wrote in Event Sourcing for the Other 95%, a number on its own means nothing, to an AI as much as to a human. Give it the history and the context around that number, and you get a far more interesting story. When an agent makes a decision, we need to be able to explain it afterwards, and when it makes a mistake, we need to be able to undo it. And you can't recover from an error if you don't know how you got there in the first place. Without a trail of breadcrumbs, there's no way back.

Then there's the load; mobile phones increased the pressure on our systems by roughly a factor of ten, and estimates for agentic AI range from a hundred to a thousand times. When I asked the room who was confident their systems could handle a thousand times more traffic, nobody raised a hand.

Explainability, data in context, scalability and recoverability are things event sourcing gives you almost by design. They're also exactly what existing systems were never designed to provide.

How do you get an existing, legacy system to tell its story?

The core of the problem is that an existing system is built to tell you where things stand, not how they got there.

The database will tell you that order 1042 is cancelled, that it was last changed at 14:32, and that the order service made the change. What it won't tell you is that the card issuer declined the payment at 14:03, that a retry was declined again at 14:18, and that an AI agent finally cancelled the order at 14:32 under the payment timeout policy. Why the order was cancelled was simply never recorded.

That’s the question we set out to answer this year. The short version: no single source holds the full story, so you have to look in more than one place.

A map is not the traffic: why code analysis isn’t enough

Our first step was a tool we call Discovery. It scans the source code of an application and reverse-engineers a detailed event model from it: the endpoints, message handlers and scheduled jobs through which work arrives, the operations behind each of them, and the tables each operation reads from and writes to.

That turned out to be very useful, but it didn't solve the great migration problem. It gave us a map showing where to cross the river, and the crocodiles were still there.

A map shows you what can happen. It shows every route a request could take, and it looks the same whether the system is idle or busy. It doesn't tell you which routes are actually taken, how often, for whom, and which decisions were made along the way. For that, you need to watch the traffic.

Where the story hides: CDC, API calls and logs

The obvious place to watch the traffic is the database. Change Data Capture tells you that the status field of an order changed from PENDING to CANCELLED. We can all guess that the order was cancelled, but by whom, and why? Nobody knows. Decisions that didn't change anything, like a refused payment, don't even leave a trace.

API calls are better at capturing intent. They show you what was asked and what was answered, but not what the application decided in between. You could try to correlate API calls with database changes based on timing, and it would probably work 95% of the time. In a land registry, that would mean transferring quite a few houses to the wrong owner.

Logs show what the code did technically: errors, timings, and which paths ran. Business information is deliberately kept out of them, because personal data in logs is a privacy and security risk.

So where do you capture the story? Do you scan the source code, watch the API calls, follow the database changes, or observe the code as it runs? We found the answer, and unfortunately, it was all of the above.

Meet Axoniq Clarity: capturing decisions in existing legacy systems

That's why we're building Axoniq Clarity. It records the decisions your existing systems make as events, while those systems keep running exactly as they do today.

Axoniq Clarity collects evidence from four sources, and each one fills a gap the others leave. The source code tells us what can happen, and it carries a lot of intent. Axoniq Clarity can work without it, but the results are much richer when it's available. The incoming and outgoing API calls tell us what was asked and what was answered. When a system calls an external payment provider and gets an OK back, that's strong evidence that the payment for this particular order was confirmed. The code execution, which we observe with a Java agent (the JVM kind, not the AI kind), shows which paths actually ran and which calls succeeded or failed. And the database changes tell us what was eventually committed.

The hard part is correlating all four. Axoniq Clarity joins the evidence into a single trail per request, from the call that started it to the rows it changed. From that trail, it derives the decisions the system made, including the ones that didn't change anything, and records them as business events together with the evidence behind them. The individual observations are stored as events as well, on a separate track. Nothing is guessed, and the application itself isn't changed.

In the user interface, you start with a high-level business view: which processes a system runs, how often each one completes, gets refused or fails, and where most cases get lost. From there, you can dig into any finding. The deeper you go, the more technical it gets, all the way down to the method calls that prove something actually happened. In the demo, that meant following a single order across seven services.

Axoniq Clarity works in real time. In its current state, it handles around 20,000 events per second, which is more than most systems will ever produce. For now, it's limited to Java, but that won't stay that way for long.

Most of the value, without the migration

To be clear, a system with Axoniq Clarity is not an event-sourced system. Its database is still the source of truth, and the events are derived from what the system actually does. But it does get you most of the value.

Explainability and data in context are covered. Every decision is recorded with its evidence, and you can trace it back to the exact method call where it was made. The events describe what happened in business terms, so you can keep them and feed them to an agent that needs the context.

Scalability and recoverability are partly covered. Observing a system doesn't make it any faster, but agents and new views can read from the captured events instead of from the original system. Similarly, you can see exactly what went wrong and what it affected, but the fix still happens in the legacy system. Axoniq Clarity also tells you when it finds observations it can't relate to any decision, which is a telltale sign that you're not capturing everything.

History starts when you start capturing. Whatever happened before that was never kept, and there's only so much you can infer from the current state of the data.

Once you have that information, you can decide what each system needs. For many systems, the answer is to leave them as they are. The application keeps running unchanged while it emits events as things happen. It isn't event-driven in itself, but it can take part in an event-driven architecture, and other systems can react to what happens instead of waiting for a batch job. A lot of production problems start at 1 or 2 in the morning, when all those batch jobs saturate the network at the same time. We'll be happy to see those go.

Some systems will turn out to be worth the crossing after all. For those, you now have a live record of what the new system needs to do, which makes modernizing them a lot less of a leap.  You can shadow-run the new system next to the old one and compare the events both of them produce, so you know whether it behaves the same way based on facts rather than hopes.

That's how we want to bring event sourcing to the other 95%. Instead of asking them to learn event sourcing first, we give them most of the benefits up front, and they can decide later whether they want the rest.

Looking for the unexpected

We're preparing a beta and are looking for existing legacy systems to run it on. We've built a few laboratory systems to test our ideas, and yes, Claude helped us build some of them. But those aren't the real thing. The systems we're after are the ones that have been battle-tested for years, built on Struts 1, JSF or JSPs by people who have retired since. If you're maintaining one of those, I'd love to hear from you.

In the end, how messy things get is up to us as a community. No single company or framework is going to solve this on its own, so we need to find out together what works.

What I'd like to work towards is a future where our systems can explain themselves without a great migration. The wildebeest will keep crossing the Mara River, as they should, but our legacy systems shouldn't have to make that crossing just to tell their story.

You can watch the full keynote here: A new perspective on event sourcing for the other 95%.

Which system in your landscape would you never dare to migrate?

See it in production

Otto, Nets, MoneyLion, DPG Media and other teams run event-sourced systems in production with Axoniq.

Read customer stories
Join the Thousands of Developers

Already Building with Axon in Open Source

Talk to us about LTS →
Join the Thousands of Developers

Already Building with Axon in Open Source

Talk to us about LTS →