And adding them changes where keys land, so ordering across the change is lost.
kafka-topics.sh --bootstrap-server localhost:9092 \
--alter --topic orders --partitions 12
order-42 was on partition 3 with 6 partitions.
With 12 it maps to partition 9 - and the old events stay on 3.
Two partitions now hold the history of one key, in the wrong order.
Run this yourself in the Online Java Compiler, spin up a live REST API in the API Sandbox, or practise with Java interview questions.
Published 2026-08-11