What Is Event-Driven Architecture?
Event-Driven Architecture is an approach to application design in which individual components communicate through events.
An event informs the system that something has happened. For example:
- an order has been created,
- a payment has been completed,
- a user has registered,
- an order status has changed,
- a product has been restocked.
Imagine an e-commerce application. When a customer places an order, the system creates an event:
OrderCreated
This event can then be consumed by the payment service, warehouse system, and notification service. The service that created the order does not need to call each of them directly.
Request-Response vs. Event-Driven
With the traditional request-response model, communication might look like this:
Order Service → Payment Service → Warehouse Service → Notification Service
Each service waits for a response from the previous one. If one service is slow or unavailable, it can affect the entire request.
In an event-driven model, the flow can look like this:
Order Service → OrderCreated
And then:
OrderCreated → Payment Service
OrderCreated → Warehouse Service
OrderCreated → Notification Service
The difference is that the service simply announces what happened. Other components decide whether and how they want to respond to that event.
The result is looser coupling between different parts of the system.
Message Queues and Event Brokers
In larger applications, events are often not sent directly between services. Instead, a message broker can receive and distribute messages between them.
In simple terms:
Producer → Message Broker → Consumers
A broker can handle tasks such as message delivery, temporary message storage, retries, and distributing messages to multiple consumers.
Two technologies commonly associated with this approach are RabbitMQ and Apache Kafka.
RabbitMQ vs. Kafka
RabbitMQ is a message broker particularly well suited to traditional message processing, queues, and background tasks. It can be useful for processing orders or generating documents in the background.
Kafka is a distributed event streaming platform designed to handle large volumes of events. It is particularly useful when large amounts of data need to be processed and multiple systems need to work with the same stream of events.
There is no simple answer to which technology is “better.” The right choice depends on the specific problem, data volume, processing requirements, and scaling strategy.

What Does an Event-Driven Order Flow Look Like?
Imagine a simple e-commerce application:
- Order creation
The Order Service creates the order and publishes OrderCreated. - Payment
The Payment Service consumes the event and, after successful payment, creates PaymentCompleted. - Inventory
The Warehouse Service responds to the event and updates inventory. - Notification
The Notification Service sends the customer an order confirmation.
The resulting flow is:
OrderCreated → PaymentCompleted → InventoryUpdated → NotificationSent
Each service handles its own responsibility without being tightly dependent on the others.
What Happens If a Service Goes Down?
One of the advantages of event-driven architecture is the ability to process events asynchronously.
If the Notification Service is temporarily unavailable, for example, an event can remain stored in the message broker and be processed once the service is available again.
However, this approach also introduces new challenges. Developers need to consider duplicate events, retry mechanisms, message ordering, monitoring, and situations where event processing fails.
When Does Event-Driven Architecture Make Sense?
EDA can be particularly useful for:
- e-commerce platforms,
- payment and logistics systems,
- IoT applications,
- analytics platforms,
- real-time monitoring,
- notification systems,
- applications with many background processes.
Another advantage can be easier scaling of individual components. If the Payment Service handles significantly more requests than other parts of the system, for example, it can be scaled independently.
For a small and simple application, however, event-driven architecture may add unnecessary complexity. It introduces additional components that need to be monitored, maintained, and managed.
Conclusion
Event-Driven Architecture allows applications to respond to events without requiring individual components to be tightly connected. This can make systems more flexible, scalable, and resilient.
However, not every application needs Kafka, RabbitMQ, or a complex event-driven architecture. The most important step is to first understand what problem you are trying to solve and only then choose the architecture and technologies that best fit the requirements.