<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Problem about Configuring Flume as Kafka Consumer in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Problem-about-Configuring-Flume-as-Kafka-Consumer/m-p/61018#M45285</link>
    <description>&lt;P&gt;My Configuration is&lt;/P&gt;&lt;P&gt;Cloudera Manager&amp;nbsp;5.12.1&lt;/P&gt;&lt;P&gt;Flume 1.7.0&lt;/P&gt;&lt;P&gt;Kakfa&amp;nbsp;2.2.0-1.2.2.0.p0.68&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I created topic "test" in kafka, and would like to configure flume to act as consumer to fetch data from this topic and save it to HDFS.&lt;/P&gt;&lt;P&gt;My flume configuration is&lt;/P&gt;&lt;P&gt;#################################&lt;/P&gt;&lt;P&gt;tier1.sources = source1&lt;BR /&gt;tier1.channels = channel1&lt;BR /&gt;tier1.sinks = sink1&lt;/P&gt;&lt;P&gt;tier1.sources.source1.type = org.apache.flume.source.kafka.KafkaSource&lt;BR /&gt;tier1.sources.source1.zookeeperConnect = &lt;SPAN&gt;bda03:2182,&amp;nbsp;bda04:2182,&lt;/SPAN&gt;bda05:2182&lt;BR /&gt;tier1.sources.source1.topic = test&lt;BR /&gt;tier1.sources.source1.groupId = flume&lt;BR /&gt;tier1.sources.source1.channels = channel1&lt;BR /&gt;tier1.sources.source1.interceptors = i1&lt;BR /&gt;tier1.sources.source1.interceptors.i1.type = timestamp&lt;BR /&gt;tier1.sources.source1.kafka.consumer.timeout.ms = 100&lt;/P&gt;&lt;P&gt;tier1.channels.channel1.type = memory&lt;BR /&gt;tier1.channels.channel1.capacity = 10000&lt;BR /&gt;tier1.channels.channel1.transactionCapacity = 1000&lt;/P&gt;&lt;P&gt;tier1.sinks.sink1.type = hdfs&lt;BR /&gt;tier1.sinks.sink1.hdfs.path = /user/flume/tmp/&lt;BR /&gt;tier1.sinks.sink1.hdfs.rollInterval = 5&lt;BR /&gt;tier1.sinks.sink1.hdfs.rollSize = 0&lt;BR /&gt;tier1.sinks.sink1.hdfs.rollCount = 0&lt;BR /&gt;tier1.sinks.sink1.hdfs.fileType = DataStream&lt;BR /&gt;tier1.sinks.sink1.channel = channel1&lt;/P&gt;&lt;P&gt;######################################&lt;/P&gt;&lt;P&gt;The configuration was just copied from&amp;nbsp;&lt;A href="https://www.cloudera.com/documentation/kafka/latest/topics/kafka_flume.html" target="_blank"&gt;https://www.cloudera.com/documentation/kafka/latest/topics/kafka_flume.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After starting the flume agent, there was no error message in flume and kafka log file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried to put some records to topics:&lt;/P&gt;&lt;P&gt;$ kafka-console-producer --broker-list bda03:9092,bda04:9092,bda05:9092 --topic test&lt;/P&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;This is new message&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, there was nothing put into HDFS.&lt;/P&gt;&lt;P&gt;Then, I tried to&amp;nbsp;retreive message from topic "test" via command line (with consumer group flume)&lt;/P&gt;&lt;P&gt;$&amp;nbsp;kafka-console-consumer --zookeeper bda03:2182,bda04:2182,bda05:2182 --topic test --consumer-property group.id=flume&lt;/P&gt;&lt;P&gt;The output was:&lt;/P&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;This is new message&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If the flume agent could fetch message from the topic, then the output of the above command should be empty.&lt;/P&gt;&lt;P&gt;The result indicated that the flume agent could not get any data from Kafka.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anyone help?&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 16 Sep 2022 12:24:58 GMT</pubDate>
    <dc:creator>alfredng</dc:creator>
    <dc:date>2022-09-16T12:24:58Z</dc:date>
  </channel>
</rss>

