【问题标题】:Can kafka-streams listen to two topics and wait for the other event that matches the id and once it receives post it to another topic?kafka-streams 是否可以监听两个主题并等待与 id 匹配的另一个事件,一旦它收到将其发布到另一个主题?
【发布时间】:2020-07-30 03:24:31
【问题描述】:

我有两个不同的 kafka 主题,其中有相同的字段 Id。当流在这两个主题上接收到相同的 id 时,是否可以监听这两个主题并向第三个主题写入新消息?

【问题讨论】:

    标签: apache-kafka-streams node-kafka-streams


    【解决方案1】:

    也许您可以执行窗口连接。 也许这会有所帮助: https://kafka.apache.org/10/documentation/streams/developer-guide/dsl-api#kstream-kstream-join

    对于流-流连接,重要的是要强调一侧的新输入记录将为另一侧的每个匹配记录生成连接输出,并且在给定的连接窗口中可以有多个这样的匹配记录

    【讨论】:

      猜你喜欢
      • 2019-07-25
      • 1970-01-01
      • 2020-05-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-03-18
      • 2017-12-13
      • 1970-01-01
      相关资源
      最近更新 更多