rpk topic add-partitions
An rpk command that increases the number of partitions of an existing topic.
In more detail
Kafka can add partitions but never remove them. Records already written stay where they are, but new records with an existing key may now hash to a different partition, which breaks per-key ordering across the change.
Example
rpk topic add-partitions m07l04-ev --num 2Related terms
- rpk — The command-line tool that ships with Redpanda for starting brokers and managing topics, consumer groups and schemas.
- partition — One of several independent ordered logs a message stream is split into, with each message routed to one partition by its key.
- partitioner — The producer component that chooses which partition each record is sent to.
- ordering guarantee — A promise about whether messages are processed in the order they were sent, which is often limited to one key or partition.
Taught in
- Watching Lag And Sizing Partitions — Apache Kafka & Event Streaming