nerdexam
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)
  • A
    4% (1)
  • B
    26% (7)
  • C
    59% (16)
  • D
    11% (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.

Full CCDAK Practice