Choosing Apache Kafka For A New Project – A Questionnaire
Tags: kafka, checklist, sre
Published: 2023-08-28 22:16:05

---
title: Choosing Apache Kafka For A New Project – A Questionnaire
published: true
date: 2023-08-28 22:03:22 UTC
tags: kafka,checklist,sre
canonical_url: https://akrisanov.com/choosing-kafka/
---

 ![Choosing Apache Kafka For A New Project – A Questionnaire](https://akrisanov.com/content/images/2023/08/Biard-Franc-ois-Auguste---The-Duke-of-Orle-ans-Descending-the-Great-Rapids-of-the-Eijampaika-on-the-Mionio-River-in-Lapland--August-1795-.jpg)

In any modern project where there is a need to process events – a set of messages or a stream of data – developers often propose Apache Kafka as the infrastructure solution. This is not always a weighted choice – where a classic broker like ActiveMQ will do, marketing sometimes prevails.

But let's assume that you have deliberately chosen Kafka, or that the infrastructure team has left you no alternative. Before setting up broker parameters and writing producers and consumers, what questions should you ask yourself? To ensure a smooth start, I have prepared the following checklist/questionnaire:

1. The amount of data that is going to be generated by the producers → Will **the network channel** be sufficient for the entire system and its critical components? Is there an option to make use of [message compression](https://www.conduktor.io/kafka/kafka-message-compression/?ref=akrisanov.com)?
2. [**Data retention policy**](https://strimzi.io/blog/2021/12/17/kafka-segment-retention/?ref=akrisanov.com): How long do you need to keep data? → Consider the business and data protection requirements of a product you are developing, and the cost of storing data.
3. **Message sending guarantees ([Acks](https://www.conduktor.io/kafka/kafka-producer-acks-deep-dive/?ref=akrisanov.com))** → Finding the right balance between latency and reliability within replication (durability).
4. **Message delivery guarantees** → How critical is message loss or duplication of messages to the business objective? Are [idempotency](https://www.conduktor.io/kafka/idempotent-kafka-producer/?ref=akrisanov.com) and [transactionality](https://www.confluent.io/blog/transactions-apache-kafka/?ref=akrisanov.com) needed?
5. **What [partitioning strategy](https://redpanda.com/guides/kafka-tutorial/kafka-partition-strategy?ref=akrisanov.com) will producers use?** → Is the default strategy (`Default partitioner`) appropriate?
6. For a particular topic, is it important to store the entire message log, or are the latest changes sufficient → Consider using [**Compacted**](https://docs.aiven.io/docs/products/kafka/concepts/log-compaction?ref=akrisanov.com) **[topics](https://docs.confluent.io/kafka/design/log_compaction.html?ref=akrisanov.com)**.
7. **Do the created topics require a [consumer group](https://www.conduktor.io/kafka/kafka-consumer-groups-and-consumer-offsets/?ref=akrisanov.com)?** → How do you plan to scale consumers and their bandwidth? What happens when the group is [rebalanced](https://www.verica.io/blog/understanding-kafkas-consumer-group-rebalancing/?ref=akrisanov.com)?

That's it. The checklist/questionnaire is by no means exhaustive and it only covers the essentials. It leaves out a lot of things such as data encryption, authentication, authorisation, and cluster configuration – assuming that the SRE team or some PAAS will take care of that for you.