简体   繁体   English

您如何从 Spring-Apache-Kafka-Streams 中的 Kafka 输入主题中读取数据,并对特定的 output 主题进行不同的分析?

[英]How do you read from a Kafka input topic in Spring-Apache-Kafka-Streams and produce different analytics on specific output topics?

I have referred this. 我已经提到了这个。 but, this is an old post so i'm looking for a better solution if any. 但是,这是一篇旧帖子,所以我正在寻找更好的解决方案(如果有的话)。

I have an input topic that contains 'userActivity' data.我有一个包含“userActivity”数据的输入主题。 Now I wish to gather different analytics based on userInterest, userSubscribedGroup, userChoice, etc... produced to distinct output topics from the same Kafka-streams-application.现在,我希望收集基于 userInterest、userSubscribedGroup、userChoice 等的不同分析,这些分析来自同一个 Kafka-streams-application 的不同 output 主题。

Could you help me achieve this... ps: This my first time using Kafka-streams so I'm unaware of any other alternatives.你能帮我实现这个... ps:这是我第一次使用Kafka-streams,所以我不知道任何其他选择。

For dynamically choosing which topic to send to at runtime based on each record's key-value pairs.用于根据每条记录的键值对在运行时动态选择要发送到的主题。 Apache Kafka version 2.0 or later introduced a feature called: Dynamic routing Apache Kafka 2.0或更高版本引入了一个特性叫做: 动态路由

And this is an example of it: https://kafka-tutorials.confluent.io/dynamic-output-topic/confluent.html这是一个例子: https://kafka-tutorials.confluent.io/dynamic-output-topic/confluent.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何从Apache Nifi的kafka主题中生成Avro消息,然后使用kafka流读取它? - How to produce Avro message in kafka topic from apache nifi and then read it using kafka streams? Spring和Kafka:加入3个Kafka主题以生成输出Kafka流 - Spring and Kafka: Join 3 Kafka topics to generate output Kafka streams Kafka 精确一次处理 - 您是否也需要您的流应用程序来生成 kafka 主题? - Kafka exactly_once processing - do you need your streams app to produce to kafka topic as well? 使用kafka流将数据从输入主题写入输出主题时,kafka使用者出错 - Error in kafka consumer while writing data from input topic to output topic using kafka streams 如何在 Kafka 流中使用实例特定主题? - How to use instance specific topics in Kafka streams? 您如何在 Apache Kafka 中找到哪些主题有数据? - How do you find what topics have data in Apache Kafka? Apache Kafka 按特定顺序消费来自不同主题的事件 - Apache Kafka consume events from different topics in specific order Spring Kafka:按顺序从两个不同的主题中读取 - Spring Kafka: Read from two different topics in order 如何加入两个 Kafka 流并在具有 Avro 值的主题中生成结果 - How to join two Kafka streams and produce the result in a topic with Avro values Kafka Streams 不读取输入主题 - Kafka Streams not reading input topic
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM