Event-Driven vs Message-Based: The Misunderstanding That Breaks Systems
Many systems today use asynchronous communication, but not every async system is event-driven. This misunderstanding leads to tightly coupled architectures, duplicate processing bugs, and systems that are harder to evolve than the monoliths they replaced.
Let’s break this down properly.
The Root of the Confusion
At a glance, both approaches look similar:
So teams assume:
“Event-driven = messaging system”
But that’s where things go wrong.
Event-Driven Architecture (EDA)
An event is a fact:
“Something already happened.”
Examples:
Key characteristics:
👉 Think of it as broadcasting history
Message-Based Communication
A message is usually a command:
“Please do this.”
Examples:
Key characteristics:
👉 Think of it as delegating work
The Core Difference
Real-World Example (From My Experience)
I built a Notification Service using:
Event-Driven Flow
User Service → publishes → UserRegistered event
↓
Kafka Topic (user-events)
↓
Notification Service consumes
↓
Sends Email / Push Notification
Here:
👉 This is true event-driven architecture
Message-Based Flow (Common Mistake)
User Service → sends → SendWelcomeEmail message
↓
Queue
↓
Notification Service consumes
↓
Sends Email
Here:
Recommended by LinkedIn
👉 This is messaging — not EDA
The Dangerous Misuse
“Using Kafka like a Queue”
This happens when teams:
Example:
Kafka Topic: send-email
Message: SendEmail(userId)
This is just a queue with extra complexity.
👉 You lose:
When to Use Each
Use Event-Driven When:
Use cases:
Use Message-Based When:
Use cases:
Idempotency: The Hidden Requirement
In event-driven systems, duplicate processing WILL happen.
Why?
Solution:
👉 Use idempotency
Example approach:
if (redis.exists(eventId)) return;
process();
redis.set(eventId);
Without this:
Key Insight
Event-driven is about facts. Messaging is about actions.
If your system is saying:
✍️ Written by Janith Ranasinghe—a software engineer passionate about learning, documenting, and sharing knowledge about backend design and system architecture.