Last active
December 7, 2016 13:37
-
-
Save yarikc/1866960a59de1cf3fa74 to your computer and use it in GitHub Desktop.
Simple Flume tail to Kafka
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Name the components on this agent | |
a1.sources = r1 | |
a1.sinks = k1 | |
a1.channels = c1 | |
a1.sources.r1.type = exec | |
a1.sources.r1.command = tail -F /var/log/example.log | |
a1.sources.r1.channels = c1 | |
a1.sinks.k1.type = org.apache.flume.sink.kafka.KafkaSink | |
a1.sinks.k1.topic = test | |
a1.sinks.k1.brokerList = localhost:9092 | |
a1.sinks.k1.requiredAcks = 1 | |
a1.sinks.k1.batchSize = 20 | |
#a1.sinks.k1.serializer = org.apache.flume.serialization.HeaderAndBodyTextEventSerializer | |
#a1.sinks.k1.sink.serializer.appendNewline = false | |
# Use a channel which buffers events in memory | |
a1.channels.c1.type = memory | |
a1.channels.c1.capacity = 100 | |
a1.channels.c1.transactionCapacity = 100 | |
# Bind the source and sink to the channel | |
a1.sources.r1.channels = c1 | |
a1.sinks.k1.channel = c1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment