In brief
Replace an ESB when every integration change waits in a queue for one team, not because the bus is old. Event-driven architecture works when many systems need the same business facts, for example “payment posted”, and react to them independently. An ESB handles synchronous calls with transformation and orchestration better. In practice, companies run both models side by side for years and carry out the migration flow by flow.
How an ESB differs from an event platform
An ESB (Enterprise Service Bus) receives a message, transforms it, routes it to the right system and often supervises the course of the whole process. The integration logic lives in the bus: format mappings, routing rules, calls to further services. The systems on both sides know little about each other, while the bus knows everything.
An event platform, for example Apache Kafka, works the other way around. The system where something happened publishes an event to a topic, and every interested system reads it at its own pace. The platform stores events for a set time, so a new consumer can read them from the beginning or from a chosen point. Business rules stay in the systems that publish and consume, while the platform is responsible for durable storage, ordering within a partition and scaling.
| Feature | ESB | Event platform |
|---|---|---|
| Communication model | mainly request and response, orchestration | publishing events, many independent consumers |
| Where the integration logic is | in the bus | in the sender and consumer systems |
| A new consumer of data | a change in the bus | a new consumer group, no change at the sender |
| Reprocessing history | usually impossible | possible within the retention period |
| Typical risk | the bus as a bottleneck for change | no agreement on the event schema |
The patterns both approaches rely on (message channel, router, translator, publish-subscribe) are described in the Enterprise Integration Patterns catalog. The difference lies in where these patterns are implemented and who maintains them.
Signs the bus has become a bottleneck
The cost of every further change decides whether to replace the bus, not the age of the platform. Typical signs:
- A queue of changes at the integration team. Every new flow waits for a few people who know the bus, and product teams cannot do anything on their own.
- The same fact fetched many times. Five systems poll the core system for payment status every few minutes, because the bus cannot broadcast it once to all of them.
- A bus release as a shared maintenance window. Changing one mapping requires releasing the whole bus and regression-testing all flows.
- No history. After a failure of a consumer, messages from the last few hours cannot be replayed, so data is reconciled by hand.
- Vendor support ends. Moving to a newer version of the bus costs almost as much as changing the approach.
At a bank, a typical example is instant payments: fraud monitoring, customer notifications, the general ledger and reporting all need the transfer status at the same time. This is a natural case for events, which we expand on in the article Instant payments and the architecture of a bank's systems.
When an ESB is still a good choice
Event-driven architecture will not replace every integration. A bus or a simple API layer remains the better choice when:
- the caller needs an answer immediately, for example a mobile app asks for a balance and waits for the result;
- a process requires orchestration of several steps with compensation, and the systems along the way cannot publish events;
- external partners send files or messages in legacy formats (EDI, SOAP) that have to be transformed anyway;
- there are only a few flows and little traffic, so a new platform would add more maintenance than benefit.
A reasonable target is usually a division of tasks, not “zero ESB”: events for business facts broadcast to many consumers, APIs for synchronous queries, and a bus or a lighter integration layer for adapters to systems that cannot be changed.
How to move integrations step by step
A migration from a bus to an event platform succeeds when it proceeds flow by flow and it is possible to return to the previous state at every stage.
- Inventory of flows. Establish who communicates with whom, in what mode, with what volume and who owns each flow. Some of them turn out to be dead and can simply be switched off.
- Choosing the first flow. Best is a fact with many consumers and one owner, for example “payment posted” at a bank or “service activated” at an operator.
- Publishing events alongside the bus. The source system, or when it cannot be changed, Change Data Capture, publishes the event while the bus keeps running. New consumers already read from the platform.
- Switching consumers one at a time. Each consumer moves to events separately, with a period of parallel operation and a comparison of results.
- Switching off the flow in the bus. Only when no consumer uses it any more.
This approach resembles the pattern of gradually replacing an old system with a new one (strangler fig): the old and new worlds run side by side, and traffic moves over in pieces. Such a change in a bank's payments is described in the scenario Replacing an ESB with a Kafka event platform.
What changes in the team and in testing
Replacing a bus is as much an organizational change as a technical one. The integration team stops writing mappings for everyone and starts maintaining the platform: topic naming standards, a schema registry, permissions, monitoring of consumer lag. Product teams are responsible for the events they publish, just as for their own APIs.
Testing changes too. Instead of tests of the whole flow through the bus, you need event contract tests (does a new schema version break consumers), idempotency tests (can a consumer cope with the same event twice) and replay tests (does a consumer return to the right place after a failure). The first decisions for the platform itself, from partitions to retention, are covered in the article Apache Kafka in the enterprise.
Questions and answers
Is Kafka just a newer ESB?
No. Kafka does not transform messages or orchestrate processes; it durably stores streams of events and makes them available to many consumers. Transformations and business rules stay in applications or in separate stream processing services, for example Kafka Streams. If you recreate all the logic of the old bus in Kafka, you will get the same problems in a new tool.
How long does replacing an integration bus take?
It depends on the number of flows and on whether the source systems can publish events. The first flow can usually be put into production in a few weeks, but fully switching off the bus in a large organization is a multi-year program. That is why a plan makes sense only if each stage delivers value on its own, not just at the end.
Does event-driven architecture require microservices?
No. Events can be published by monoliths, by packaged systems through CDC, and even by IBM i applications. Event-driven architecture concerns the exchange of information between systems, not their internal structure. A good step is often a modular monolith that publishes events outward, instead of immediately splitting the system into dozens of services.
What about message delivery guarantees?
Kafka stores events durably and lets you read them again, and with the right producer configuration and transactions it offers exactly-once semantics within Kafka itself. At the boundary with other systems it is safer to assume at-least-once delivery and design consumers so that processing the same event twice does not change the result.