Apache Kafka checklist¶
Copy this list into a pull request, design review or project kickoff and tick what applies. Rules are grouped by level and sorted by score (criteria). Each links to the file that explains it and cites its sources. Automatable names tools that can check the rule in CI (see the file's "How to enforce" section).
Also apply the general checklist.
This file is generated by python3 scripts/rank.py fix from the guidelines. Don't edit it by hand.
Recommended (6–8)¶
-
KAFKA-1(8) Choose each record's key by the ordering you need: records with the same key go to the same partition, and Kafka keeps order only within a partition. (specific/kafka) -
KAFKA-5(8) For data you can't afford to lose, use a replication factor of 3,min.insync.replicas=2and produceracks=all, and leave unclean leader election off. (specific/kafka) Automatable: CreateTopicPolicy. -
KAFKA-7(8) Commit offsets only after the records are processed, and make processing idempotent, because after a failure Kafka redelivers the records since the last commit. (specific/kafka) -
KAFKA-12(8) Give every topic a schema (Avro, Protobuf or JSON Schema) in a schema registry, and enforce a compatibility type for each subject. (specific/kafka) Automatable: buf breaking, Schema Registry Maven plugin. -
KAFKA-14(8) Authenticate every connection to the brokers with TLS client certificates or SASL over TLS, turn on theStandardAuthorizer, and give each application its own principal with only the ACLs it needs. (specific/kafka) -
KAFKA-2(7) Choose a topic's partition count when you create it, from the throughput and consumer parallelism you need, with room for growth. (specific/kafka) -
KAFKA-3(7) Create topics explicitly with their partition count, replication factor and retention, and turn off automatic topic creation on the brokers. (specific/kafka) Automatable: CreateTopicPolicy. -
KAFKA-6(7) Keep producer idempotence on, and setenable.idempotence=trueexplicitly, so that conflicting settings fail when the producer is created instead of silently turning it off. (specific/kafka) -
KAFKA-8(7) Don't let a record that can't be processed block its partition: after a bounded number of retries, write it with the error details to a dead-letter topic and move on. (specific/kafka) -
KAFKA-13(7) Register schemas from CI after a compatibility check, and setauto.register.schemas=falseon producers in production. (specific/kafka) Automatable: Schema Registry Maven plugin. -
KAFKA-15(7) Run production clusters with dedicated KRaft controller nodes, usually three or five, rather than nodes that are both broker and controller. (specific/kafka) -
KAFKA-16(7) Monitor consumer lag for every consumer group, and the brokers' under-replicated and under-min-ISR partition counts, and alert when lag keeps growing or those counts aren't 0. (specific/kafka) -
KAFKA-4(6) Set each topic's cleanup policy and retention on purpose: keep records at least as long as consumers may lag behind or need to replay them, and use compaction (cleanup.policy=compact) for topics where only the latest value per key matters. (specific/kafka) Automatable: CreateTopicPolicy. -
KAFKA-9(6) Keep the work for eachpollwell withinmax.poll.interval.ms, and lowermax.poll.recordswhen processing is slow. (specific/kafka)
Conditional (1–5)¶
-
KAFKA-10(5) For consume-transform-produce flows between Kafka topics, get exactly-once processing from Kafka Streams or a transactional producer, and read the results withisolation.level=read_committed. (specific/kafka) -
KAFKA-11(5) For queue-style work whose records are independent and need no ordering, consider a share group (production-ready since Kafka 4.2) instead of a consumer group. (specific/kafka)