Confluent
CCDAK · Question #36
An ecommerce website maintains two topics - a high volume "purchase" topic with 5 partitions and low volume "customer" topic with 3 partitions. You would like to do a stream-table join of these…
The correct answer is C. Model customer as a GlobalKTable. In case of KStream-KStream join, both need to be co-partitioned. This restriction is not applicable in case of join with GlobalKTable, which is the most efficient here.
Developing with Kafka Streams
Question
An ecommerce website maintains two topics - a high volume "purchase" topic with 5 partitions and low volume "customer" topic with 3 partitions. You would like to do a stream-table join of these topics. How should you proceed?
Options
- ARepartition the purchase topic to have 3 partitions
- BRepartition customer topic to have 5 partitions
- CModel customer as a GlobalKTable
- DDo a KStream / KTable join after a repartition step
How the community answered
(27 responses)- A4% (1)
- B26% (7)
- C59% (16)
- D11% (3)
Explanation
In case of KStream-KStream join, both need to be co-partitioned. This restriction is not applicable in case of join with GlobalKTable, which is the most efficient here.
Topics
#GlobalKTable#stream-table join#co-partitioning#Kafka Streams topology
Community Discussion
No community discussion yet for this question.