I have now shipped production pipelines on both Azure Event Hubs and self-hosted Apache Kafka. The comparison posts I see online are mostly written by people who have done one in depth and read the documentation for the other. Here is a comparison from someone who has actually operated both.
What They Have in Common
More than most people expect. Both use a partition-based model with independent consumer groups. Both provide ordered delivery within a partition. Both expose an offset-based consumption model where consumers track their own position. Code written for one can, with the right abstraction layer, work against the other. The concept transfers.
The experience of debugging a consumer that is falling behind on a partition is nearly identical. Consumer group lag, partition reassignment after a consumer crash, the tradeoffs of key-based partition routing — all of these are the same problem in both environments.
Where They Differ in Practice
Operations overhead. This is the biggest difference and it is not close. Self-hosted Kafka requires you to manage Zookeeper (until KRaft, which is still a way off), broker configuration, disk sizing, replication factor tuning, log segment management, and upgrade procedures. Event Hubs does none of that. You provision throughput units and the service handles the rest. For a team without dedicated infrastructure engineers, this difference alone may justify the managed service premium.
Ecosystem. Kafka wins here, and it is not even a competition. Kafka Connect, Kafka Streams, Schema Registry, ksqlDB, Debezium, a hundred connector plugins — this ecosystem does not exist for Event Hubs. If you need to pull data from a database with CDC, or run stateful stream processing without Spark, or enforce Avro schemas with a registry, Kafka has the tooling and Event Hubs does not. You can sometimes work around this with Azure Data Factory or Azure Stream Analytics on the Event Hubs side, but they are not drop-in replacements.
Retention limits. Kafka retention is configurable to essentially any window (limited by your disk budget). Event Hubs standard tier caps at 7 days. Event Hubs premium tier adds longer retention, but at additional cost. If you are using the Kafka topic as a replay buffer for more than a week, Event Hubs standard forces you to supplement with Blob Storage via the Capture feature.
Pricing model. Kafka's cost is compute plus storage — VMs, disks, data transfer. Event Hubs charges by throughput unit plus ingress/egress volume. At low to moderate throughput, Event Hubs is often cheaper because you are not paying for idle VMs. At high throughput (tens of MB/s sustained), the per-TU cost of Event Hubs can exceed the cost of running your own cluster. Do the math for your specific volume before committing.
# Event Hubs: approximate cost calculation
# Standard tier: $0.015/million events + TU cost
# 1 TU = $0.015/hour = ~$11/month
# At 10 million events/day on 2 TUs:
# TU cost: 2 * $11 = $22/month
# Event cost: 10M * 30 * $0.015/1M = $4.50/month
# Total: ~$26/month
# Self-hosted Kafka: 2 x Standard_D2s_v3 (~$0.096/hour each)
# VM cost: 2 * 0.096 * 720 = ~$138/month
# Disk: 2 x 256 GB premium SSD = ~$40/month
# Total: ~$178/month
# At this volume, Event Hubs is 7x cheaper.
# At 10x the volume, recalculate — the crossover point shifts.
The Decision Framework
Use Event Hubs when: you are Azure-native, your team does not have Kafka ops experience, your throughput is moderate (under 50 MB/s), and you do not need the extended Kafka ecosystem tooling.
Use Kafka when: you need the ecosystem (Connect, Streams, Schema Registry), you need retention beyond 7 days without paying for external storage separately, you are multi-cloud or on-premises, or your volume is high enough that self-hosting is cheaper.
One thing to watch: Microsoft has been building Kafka protocol compatibility into Event Hubs. It is not fully there yet, but the direction is toward making it a drop-in replacement for Kafka consumers and producers. That changes the calculus when it ships. I will cover it when it goes GA. Until then, they are similar but distinct products. I am here to help you figure out which fits your situation.