StaffCoder
Kafka

Kafka Practice Exercises

Java 25Node.js 24Python 3.13
3 modules · 12 challengesSign up
Module 1 of 3 · 4 challenges

Topics & Partitions

Create, configure, grow and clean up topics through the Admin API. Learn how partition counts and per-topic settings shape everything downstream.
Finish every challenge, or complete the star challenge, to complete the module.

Challenges

4 challenges

First Topic

Sign up to unlock
10%1 of 10 solvedeasy
About this challenge

Producers are writing to a topic nobody created, and auto-create has given it one partition and a typo in its name. Create the correct topic through the Admin API with its partition count and replication factor, describe it, and delete the mistyped one. Skills: creating topics; describing and deleting topics.

Solved in a browser IDE and graded by tests. Sign up to solve

Topic Configuration

Sign up to unlock
100%1 of 1 solvedeasy
About this challenge

Every topic runs on broker defaults: a week of retention for an hour-long feed and unbounded segments on a tiny disk. Set per-topic retention, segment size, maximum message size and timestamp type at creation, change them on the fly, and read back which values are explicit and which are inherited.

Solved in a browser IDE and graded by tests. Sign up to solve

Partition Counts & Growth

Sign up to unlock
100%1 of 1 solvedeasy
About this challenge

One partition means one consumer does all the work. Grow the topic's partition count, see what that does to where existing keys land, and show that shrinking is refused. Skills: partition growth; key-to-partition mapping.

Solved in a browser IDE and graded by tests. Sign up to solve

Topic Estate Bootstrap

STAR
Solving it completes the module
100%1 of 1 solvedeasy
About this challenge

Turn a broker full of auto-created, misconfigured topics into a defined estate: create what is missing, correct what is wrong without losing its records, grow what is under-partitioned, remove the listed strays and nothing else, and report the result from a readback.

Solved in a browser IDE and graded by tests. Sign up to solve

About this path

Learn Kafka hands-on with real producers, consumers, topics, offsets, groups, transactions, streams, and operations

This path starts with topics and partitions and goes on to producers and consumers. You work through a Kafka client in Java, Node.js or Python, so you should be able to write a small program in one of them. No earlier Kafka experience is needed. The consumer module covers reading data back reliably: the poll loop, seeking to a position, and replaying a topic.

Frequently asked questions

4

What will I practice in this path?

3 modules: Topics & Partitions, Producers & Records and Consumers & Polling.

How many Kafka exercises are there, and how hard are they?

12 exercises, all easy.

What does this path run on?

You can work in Java 25, Node.js 24 or Python 3.13.

Do I need to install anything?

No. Every challenge runs in a browser-based IDE with everything already set up, and your code is graded automatically against a test suite.

We use cookies that are necessary to run Staffcoder, and optional analytics cookies to see which pages get used. Analytics stays off unless you accept. Read our Cookie Policy.