wandermonk
wandermonk

Reputation: 7356

Kafka Stream and Table joins at different time intervals

I have a very typical scenario where i need to perform cross joins between KStream from one topic at time t1 with KTable from another topic. To explain this I have come up with a diagram. Please refer the picture. I would like to understand if this is possible with Kafka Streams. I am pretty much aware that cross joins are possible. But, I would like to know if the joins are possible at different timeframes.

enter image description here

Upvotes: 0

Views: 846

Answers (1)

Matthias J. Sax
Matthias J. Sax

Reputation: 62320

Not sure if I understand the question correctly, but you can "shift" time by providing a custom timestamp extractor:

builder.table("topciName", Consumed.with(new MyTimestampExtractor()));

class MyTimestampExtractor implements TimestampExtractor { ... }

Upvotes: 2

Related Questions