# For each one of the sources, the type is defined agent.sources.execSource.type = exec agent.sources.execSource.command = echo "测试一下"
# The channel can be defined as follows. # 事件源的通道,绑定通道 agent.sources.execSource.channels = memoryChannel
# Each sink's type must be defined # kafka接收器配置 agent.sinks.kafkaSink.type = org.apache.flume.sink.kafka.KafkaSink agent.sinks.kafkaSink.kafka.bootstrap.servers = localhost:9092 agent.sinks.kafkaSink.kafka.topic = flume-kafka agent.sinks.kafkaSink.kafka.serializer.class = kafka.serializer.StringEncoder agent.sinks.kafkaSink.kafka.producer.acks = 1
#Specify the channel the sink should use # 接收器通道名称,绑定通道 agent.sinks.kafkaSink.channel = memoryChannel
# Each channel's type is defined. agent.channels.memoryChannel.type = memory
# Other config values specific to each type of channel(sink or source) # can be defined as well # In this case, it specifies the capacity of the memory channel # 通道中停留的最大事件数 agent.channels.memoryChannel.capacity = 100