Reputation: 111
When doing KStream - KTable left join i want to send the record back to the same topic if the right table doesn't match, X amount of seconds later.
Is this achievable with the DSL?
Upvotes: 0
Views: 458
Reputation: 62285
I guess you could to a
KStream[] streams = stream.leftJoin(table,...).branch(...);
stream[1].transform(...).to("input-topic");
You use branch to put joined records into the first stream and non-joined records into the second stream. The second stream is piped into transform()
that uses a state store to buffer those record, and you can send context.forward()
them using punctuations
with 5 second delay.
Upvotes: 4