Hi
You can specify a partition function while producing a message to Kafka
brokers. This function will determine which partition the message should be
sent to.
See
https://edgent.apache.org/javadoc/r1.1.0/org/apache/edgent/connectors/kafka/KafkaProducer.html#publish-org.apache.edgent.topology.TStream-org.apache.edgent.function.Function-org.apache.edgent.function.Function-org.apache.edgent.function.Function-org.apache.edgent.function.Function-



On 21 August 2017 at 12:02, Sachin Mittal <sjmit...@gmail.com> wrote:

> Hi,
> I have a topic which has four partitions and data is distributed among
> those based on a specified key.
>
> If I want to increase the number of partitions to six how can I do the same
> and also making sure that messages for a given key always go to one
> (specific) partition only.
>
> Will the existing message redistribute themselves among new partition.
>
> Also say earlier message of key A went to partition 1 and going forward any
> new message go to same partition where earlier messages for that key are?
>
> And by increasing partitions some keys may use a different partition now,
> so how do I ensure the case of all messages of that key belong to single
> partition.
>
> Thanks
> Sachin
>

Reply via email to