# Adding new partition to a keyed topic

**URL:** <https://forum.confluent.io/t/adding-new-partition-to-a-keyed-topic/5803>\
**Category:** Architecture and Design\
**Created:** [17 August 2022 03:59 UTC](https://forum.confluent.io/t/adding-new-partition-to-a-keyed-topic/5803 "2022-08-17T03:59:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![eliteteuton](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/eliteteuton/32/2131_2.png) [@eliteteuton](https://forum.confluent.io/u/eliteteuton)\
**Post date:** [17 August 2022 03:59 UTC](https://forum.confluent.io/t/adding-new-partition-to-a-keyed-topic/5803/1 "2022-08-17T03:59:32Z")

</div>

I need to increase the partition count for a Kafka topic to increase throughput at the consumer. This topic is partition keyed as the consumer expect the messages to reach them in an order.

Kafka is using the default partitioner which is hash key mod by total partitions. If I introduce a new partition, the order of the messages consumed will be messed up. Is there an easy way to introduce new partition and still maintain the order of messages consumed?

We are at Kafka version 2.5

---

<div class="post-metadata">

**Author:** ![OneCricketeer](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/onecricketeer/32/1551_2.png) [@OneCricketeer](https://forum.confluent.io/u/OneCricketeer)\
**Post date:** [4 September 2022 22:03 UTC](https://forum.confluent.io/t/adding-new-partition-to-a-keyed-topic/5803/2 "2022-09-04T22:03:43Z")

</div>

You’d have to create a new topic then mirror existing topic into it, then migrate your producers after the mirroring is complete (assuming time order matters as well).

If time order doesn’t matter, you can produce into the new topic while data is mirrored
