简体   繁体   English

卡夫卡频道中使用槽的动态主题

[英]Dynamic topic in kafka channel using flume

Is it possible to have a kafka channel with a dynamic topic - something like the kafka sink where you can specify the topic header, or the HDFS sink where you can use a value from a header? 是否可能有一个带有动态主题的kafka频道-例如可以指定主题标头的kafka接收器,或可以使用标头中的值的HDFS接收器?

I know I can multiplex to use multiple channels (with a bunch of channel configurations), but that is undesirable because I'd like to have a single dynamic HDFS sink, rather than an HDFS sink for each kafka channel. 我知道我可以多路复用以使用多个通道(具有多个通道配置),但这是不可取的,因为我想使用一个动态HDFS接收器,而不是每个kafka通道使用一个HDFS接收器。

My understanding is that the Flume Kafka channel can only be mapped to a single topic because it is both producing and consuming logs on that particular topic. 我的理解是,Flume Kafka通道只能映射到单个主题,因为它同时产生和使用该特定主题的日志。

Looking at the code in KafkaChannel.java from Flume 1.6.0, I can see that only one topic is ever subscribed to (with one consumer per thread). 查看Flume 1.6.0中KafkaChannel.java中的代码,可以看到只有一个主题被订阅(每个线程有一个使用者)。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM