You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by Dumitru Nicolae Marasoiu <ni...@gmail.com> on 2021/02/25 13:14:53 UTC

joins & co-location

Hi guys, in case of KTable with KTable joins, is co-location a requirement?
Do the 2 topics need to have the same number of partitions?
https://forum.confluent.io/t/ktable-ktable-joins-is-colocation-needed/1034
Thank you,
Nicolae

Re: joins & co-location

Posted by Bill Bejeck <bi...@confluent.io>.
Hi Nicolae

In KStream-KStream, KStream-KTable, and KTable-KTable joins, both sides of
the join need to have the same number of partitions. Kafka Streams will
check for this, and if the number of partitions isn’t the same, Kafka
Streams will throw a TopologyException.

Foreign key joins don’t require the same number of partitions between the
two tables, since you provide a foreignKeyExtractor function that extracts
the key for the join from the “calling” or left side table of the join.

HTH,

Bill
FYI I've answered the question in the forum as well.


On Thu, Feb 25, 2021 at 8:15 AM Dumitru Nicolae Marasoiu <
nicolae.marasoiu@gmail.com> wrote:

> Hi guys, in case of KTable with KTable joins, is co-location a requirement?
> Do the 2 topics need to have the same number of partitions?
> https://forum.confluent.io/t/ktable-ktable-joins-is-colocation-needed/1034
> Thank you,
> Nicolae
>