Skip to content

Instantly share code, notes, and snippets.

# Preconfigure agent
relay_agent.channels = activity_relay_channel
relay_agent.sources = activity_daemon_source
relay_agent.sinks = activity_kafka_sink
# Channel
relay_agent.channels.activity_relay_channel.type = file
relay_agent.channels.activity_relay_channel.checkpointDir = /tmp/relay/checkpoint
relay_agent.channels.activity_relay_channel.dataDirs = /tmp/relay/data
# Source
relay_agent.sources.activity_daemon_source.type = netcat
relay_agent.sources.activity_daemon_source.bind = 0.0.0.0
relay_agent.sources.activity_daemon_source.port = 3132
relay_agent.sources.activity_daemon_source.max-line-length = 10240
relay_agent.sources.activity_daemon_source.channels = activity_relay_channel
# Kafka Sink
relay_agent.sinks.activity_kafka_sink.type = org.apache.flume.sink.kafka.KafkaSink
relay_agent.sinks.activity_kafka_sink.topic = activity.history
relay_agent.sinks.activity_kafka_sink.kafka_partitioner.class = org.apache.kafka.clients.producer.internals.RandomParitioner
relay_agent.sinks.activity_kafka_sink.brokerList = localhost:9092
relay_agent.sinks.activity_kafka_sink.requiredAcks = 0
relay_agent.sinks.activity_kafka_sink.batchSize = 100
relay_agent.sinks.activity_kafka_sink.channel = activity_relay_channel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment