Use Apache Kafka when you need somewhere to publish, store and share streams of events between systems. Use Apache Flink when you need to compute over those streams, with large state, event-time logic and savepoints. They're not rivals so much as partners: Flink has a Kafka connector with exactly-once guarantees, and you can run Flink on top of Kafka.
I read Apache Kafka's home, introduction and uses pages, then Apache Flink's home, use-case and Kafka connector pages. The search "Kafka vs Flink" assumes they do the same job, and their own docs show they mostly don't.
Kafka and Flink compared
| Apache Kafka | Apache Flink | |
|---|---|---|
| Main job | Event streaming platform: publish, store, subscribe | Stateful computation over streams |
| Keeps data | Durably, per-topic retention for as long as you want | Keeps state, checkpointed to remote storage |
| Processing | Kafka Streams library for joins, filters, aggregations | SQL, DataStream API, ProcessFunction, CEP library |
| Exactly-once | Yes, efficient exactly-once processing | Yes, exactly-once state consistency |
| Connectors | Kafka Connect to hundreds of sources and sinks | Kafka connector, shipped separately from the binary |
| Typical role | The backbone that moves and stores events | The engine that analyses and reacts to them |
| Free option (as of October 2026) | Yes, open source | Yes, open source |
What Kafka is for
Kafka's introduction compares event streaming to a central nervous system for software. It lets you publish and subscribe to streams of events, store them durably and reliably for as long as you want, and process them as they occur or later. Brokers form the storage layer, and Kafka Connect continuously imports and exports data to databases and other systems.
It's built for scale: clusters of up to a thousand brokers, trillions of messages a day and latencies as low as 2ms, on the project's home page. Kafka also has its own processing option, Kafka Streams, a client library added in version 0.10.0.0 for transforming data between topics.
What Flink adds
Flink is a distributed engine for stateful computations over data streams. It handles event time and late data, keeps very large state with exactly-once consistency, and offers savepoints so you can upgrade or move a job without losing its place. Its use-case page describes event-driven applications that keep data and computation together, checkpointing to remote storage instead of querying a remote database for every event.
Flink's Kafka connector is the bridge. Flink says it reads from and writes to Kafka topics with exactly-once guarantees and tracks the latest Kafka client, which works with brokers from version 2.1.0. One catch from the docs: streaming connectors aren't part of Flink's binary distribution, and when I read the page there was no connector yet for Flink 2.3, so check versions before you upgrade.
When Kafka Streams is enough
Kafka's own uses page names alternatives for processing, including Apache Storm and Apache Samza alongside Kafka Streams. If your logic is mostly filtering, enriching and routing events between topics, Kafka Streams keeps everything inside Kafka. If you need complex windows, very large state, pattern detection or SQL across streams, that's where Flink earns its place.
How to decide
- Need a durable pipe that many systems can share? Start with Kafka.
- Need to compute over live events with lots of state? Add Flink.
- Light transformations between topics? Kafka Streams may be all you need.
- Upgrading Flink? Check the Kafka connector version for your release first.
- Building a real-time platform? Kafka plus Flink is a natural pairing.
If your team is building these skills, these ChatGPT prompts for SQL and developer productivity tools are a good next read.
My advice on Kafka or Flink
If you're asking which one to pick, you probably need Kafka first, because something has to carry and keep your events. Once you want real-time answers from those events, with state and accuracy you can trust, Flink is the engine to put on top. I'd only skip Flink if Kafka Streams covers your logic, and I'd only skip Kafka if your events already live somewhere Flink can read.
Want AI doing the heavy lifting in your marketing?
I build the systems that handle the boring 80 percent, so you get your week back. Done properly, with the human kept in.
Do you make streaming data tools? Tool makers can ask to be considered for a featured place in comparisons like this one.
Frequently asked questions
Is Flink a replacement for Kafka?
No. Kafka is an event streaming platform that stores and shares events. Flink is a processing engine, and it has a connector to read from and write to Kafka.
Can Kafka process data without Flink?
Yes. Kafka includes Kafka Streams, a library for joins, aggregations, filters and transformations, and its uses page also names Apache Storm and Apache Samza.
Does Flink work with Kafka exactly-once?
Yes. Flink's Kafka connector page says it reads from and writes to Kafka topics with exactly-once guarantees.
Which Kafka versions does Flink support?
Flink's universal Kafka connector tracks the latest Kafka client, which its page says is backwards compatible with broker versions 2.1.0 or later.
How long does Kafka keep events?
As long as you set. Kafka's introduction says retention is a per-topic setting, and events aren't deleted after they're read.

