Updated October 2026: We reworked this guide around the mistakes OSO still sees most often in production. It now covers Kafka 4.0’s removal of ZooKeeper, the new consumer rebalance protocol, share groups for queue-style work and the safer producer defaults introduced in Kafka 3.0.
At OSO we have configured, deployed and supported hundreds of Kafka clusters. The same handful of mistakes come up again and again, whether the cluster is a first proof of concept or a platform carrying payments traffic. This guide walks through each one, why it hurts and what to do instead.
Common mistake
Why it hurts
Kafka best practice
Delaying messages inside Kafka
Blocks partitions and stalls every record behind the delayed one
Schedule outside Kafka or process on completion criteria
Treating Kafka as a key-value store
Compaction is eventual, so lookups see duplicates and stale values
Materialise state in Kafka Streams or a database
Confusing logs with queues
Parallelism is capped by partition count
Use consumer groups for streams and share groups for work queues
Weakening producer durability
Acknowledged writes can be lost when a leader fails
Keep acks=all and idempotence, with replication factor 3
Poor partition keys and counts
Hot partitions, and partitions cannot be reduced later
Pick high-cardinality keys and size partitions up front
Ignoring lag and rebalances
Stop-the-world pauses and growing backlogs
Monitor lag and adopt the new consumer group protocol
Running ZooKeeper-era clusters
No upgrade path to Kafka 4.x without a KRaft migration
Migrate to KRaft on 3.x, then upgrade
Why shouldn’t you delay messages in a Kafka stream?
One Apache Kafka common mistake is trying to delay messages inside a real-time stream, for example by sleeping in a consumer until a record is “due”. Kafka delivers records in order within a partition, so a consumer that waits on one record holds up every record behind it, and a long pause can push the consumer past its poll interval and trigger a rebalance.
Instead of delaying messages, process each record when it meets clear completion criteria. If you genuinely need scheduled delivery, keep the schedule in a store built for it, such as a database table or a scheduler, and publish to Kafka when the event is due.
Why is Kafka not a key-value store?
Another frequent mistake is using Kafka as a key-value store. Compacted topics keep the latest value for each key, but compaction runs in the background and happens eventually, not immediately. A consumer reading a compacted topic can still see older values and duplicates for the same key, so it must handle them.
Kafka is also not built for ad hoc queries or analytics. It is excellent for replaying history and preserving order within a partition, but complex queries belong in a database or analytics platform fed from Kafka. For lookups inside a streaming application, materialise the topic into a state store with Kafka Streams.
Is Kafka a queue or a log?
Kafka stores messages in an immutable, replicated log. Many consumers can read the same data independently, and new use cases can be added without disturbing existing ones. That is the main advantage over point-to-point queues, where each new consumer often means a new integration.
The flip side is that a classic consumer group can only run one consumer per partition, so a slow work queue is capped by the partition count. Share groups (KIP-932, “Queues for Kafka”) remove that limit by letting several consumers work through the same partition and acknowledge records individually. They arrived as early access in Kafka 4.0 and became production-ready in Kafka 4.2. Our guide to queues in Kafka 4.0 via share groups and our Kafka vs RabbitMQ comparison explain when each model fits.
Are your producer durability settings safe?
Since Kafka 3.0, the producer defaults to acks=all with idempotence enabled (KIP-679). A common bad practice is overriding these for speed with acks=1 or acks=0, or keeping old client configuration that sets them explicitly. With acks=1, a write acknowledged by the leader can be lost if that leader fails before followers copy it.
Durability also depends on the topic. A replication factor of 1 means a single broker failure loses the partition. A widely used baseline for production topics is a replication factor of 3 with min.insync.replicas=2, so writes keep succeeding with one broker down without silently accepting under-replicated data. Our Kafka producer best practices guide covers the related batching and retry settings.
How do partition keys and partition counts go wrong?
Partitioning decides both ordering and parallelism, so it is easy to get wrong. A low-cardinality key, such as a country code or a status field, sends most traffic to a few hot partitions while the rest sit idle. Records with no key spread evenly but lose per-key ordering.
Partition counts are just as important. Kafka does not support reducing the number of partitions on a topic, and adding partitions changes which partition a given key maps to, which breaks ordering for keyed data. Choose a key that matches your ordering needs and has enough distinct values, and size the partition count for expected peak throughput before the topic goes live.
Why do consumer lag and rebalances cause outages?
Teams often watch broker health and forget about consumers. Consumer lag, the gap between the latest offset and what a group has processed, is usually the first sign that something is wrong, yet it is often unmonitored. Our Kafka performance best practices guide covers which metrics to alert on.
Rebalances are the other common pain point. Under the classic protocol, a rebalance can pause the whole consumer group. Kafka 4.0 made the next-generation consumer group protocol (KIP-848) generally available, which reduces these stop-the-world pauses; consumers opt in by setting group.protocol=consumer, as described in the Kafka 4.0 release announcement. Our article on the Kafka consumer 4.0 rebalance protocol explains the change.
Are you still running Kafka with ZooKeeper?
Apache Kafka 4.0 is the first major release to run entirely without ZooKeeper; clusters must use KRaft mode. A cluster still running ZooKeeper cannot upgrade straight to 4.x. It has to be migrated to KRaft on a 3.x release first, then upgraded.
Delaying that migration is now one of the costlier mistakes we see, because it also blocks newer features such as the new consumer group protocol and share groups. Plan the KRaft migration as its own project, with a rehearsal in a non-production environment and a rollback plan.
When should you get help running Kafka?
High-throughput, low-latency workloads, multi-tenant platforms and regulated industries such as financial services raise the stakes on every decision above. Partitioning strategy, key selection, tiered storage and strong multi-tenancy controls all need to be designed together.
Managed services shift much of that operational work to a provider, but they do not remove the need to understand client configuration, partitioning and cost. Whether you run Kafka yourself or use a managed platform, OSO’s Kafka support team and our fully managed Kafka service help teams avoid these Apache Kafka common mistakes before they reach production.
Key takeaway: Most Kafka problems come from using it for the wrong job or keeping outdated configuration. Keep Kafka for ordered, replayable event streams, leave the producer’s acks=all and idempotence defaults in place, choose partition keys carefully, monitor consumer lag and move to KRaft before upgrading to Kafka 4.x.
Frequently asked questions
What are the most common Apache Kafka mistakes?
The most common Apache Kafka mistakes are delaying messages inside a stream, using Kafka as a key-value store or database, confusing logs with queues, weakening producer durability settings, choosing poor partition keys and ignoring consumer lag. Each one usually shows up later as data loss, stalled consumers or a cluster that is hard to upgrade.
What are the main Kafka best practices for a production cluster?
The main Kafka best practices are to keep acks=all and idempotent producers, use a replication factor of 3 with min.insync.replicas=2, choose high-cardinality partition keys and monitor consumer lag. Run KRaft rather than ZooKeeper, and size partition counts before topics go live.
Can I reduce the number of partitions on a Kafka topic?
No. Kafka does not support reducing a topic’s partition count. To shrink it, create a new topic with fewer partitions and migrate producers and consumers to it. Adding partitions is possible, but it changes which partition each key maps to.
Can Kafka be used as a queue?
Yes, with limits. Classic consumer groups give queue-like processing but cap parallelism at one consumer per partition. Share groups, production-ready since Kafka 4.2, let several consumers share a partition and acknowledge records individually, which suits work-queue use cases.
What are the limitations of Kafka?
Kafka is not designed for ad hoc queries, per-message delays or key-value lookups, and it only guarantees ordering within a partition. Last-mile connections to constrained devices, such as connected cars, are often better served by a protocol like MQTT that then feeds Kafka.
Do I still need ZooKeeper for Kafka?
No. Apache Kafka 4.0 and later run only in KRaft mode, without ZooKeeper. Clusters still using ZooKeeper must migrate to KRaft on a 3.x release before upgrading to 4.x.
Talk to OSO's Kafka engineers about reviewing your cluster configuration, partitioning and upgrade path before small mistakes become production incidents.