An enterprise service bus that has been running for ten years is not a mistake to be erased, since the business depends on it. It is usually a single large shared runtime, though, run by a handful of people on a product whose support is coming to an end. This guide describes a way to move off it without ever stopping the traffic.

Inventoryevery flow Dead or unusedSwitch offSimple transportMigrate by patternHeavy logicRedesign Parallel run Old flow New integration same input · compare outputs Switchthen remove
Sort before migrating: the cheapest flow to migrate is the one you switch off.

1. Take an inventory first

List every flow with its source, its destinations, its volume, its owner and the date it last changed. The same three groups tend to appear every time.

GroupUsual shareWhat to do
Dead or unused flowsMore than expectedSwitch them off rather than migrate them
Simple transportThe majorityMigrate them in batches, pattern by pattern
Heavy business logicA minorityRedesign them one at a time

2. Translate patterns rather than products

Most buses implement the same enterprise integration patterns under their own names, and Apache Camel implements them under the original ones, such as the content-based router, the splitter, the aggregator, the idempotent consumer and the dead letter channel. The pattern carries over from one product to the other, while the configuration has to be written again.

<!-- ESB mediation: receive, validate, route by country, transform, send -->
<proxy name="OrdersIn"> ... 180 lines of XML configuration ... </proxy>
- route:
    id: orders-in
    from:
      uri: jms:queue:orders.in
      steps:
        - to: json-validator:classpath:order.schema.json
        - choice:
            when:
              - simple: "${body[country]} == 'FR'"
                steps:
                  - to: jms:queue:orders.fr
            otherwise:
              steps:
                - to: jms:queue:orders.intl

3. Keep samples of each flow

For each flow, record real input messages and the output the bus produces from them. They are the specification nobody ever wrote down, and they become the tests of the new integration.

4. Run both side by side, then switch

Deploy the new integration next to the old flow and feed it a copy of the traffic. Compare the outputs on real data, rejects included, until they match. Then move the consumers over, leave the old flow idle for a while and remove it.

5. Common problems

Buses often hide state, such as sequence numbers, deduplication tables or caches, which is best found during the inventory. Ordering is another trap, because a single shared runtime processes messages in one order while independent workloads do not, unless you ask for it explicitly. Finally, every flow you migrate has to be run afterwards, so the cheapest migration is still the one you decide not to do.

If the bus you are leaving is MuleSoft, there is a dedicated guide for it.