It is common to require ordering in same partition of given Kafka topic. That is, messages with same key should go to same partition. Now, if I want to add new partition in a running topic, how to make it and kept the consistency?
To my understanding, the default partitioning strategy is to mod on num-of-partition . When the num-of-partition changes (e.g. 4 to 5), some messages might fall into different partition from previous messages with same key.
I can image to have consistent hashing implemented to customize the partitioning behavior, but it might be to intrusive.
Or, just stop all producers until all messages are consumed up; then deploy new partition and restart all producers.
Any better ideas?