flume到kafka动态topic
json日志使用拦截器,字段取出放到header里a1.sources.r1.interceptors = i1a1.sources.r1.interceptors.i1.type = regex_extractora1.sources.r1.interceptors.i1.regex = "自定义字段":"(\\w+)"a1.sources.r1.interceptors
·
json日志使用拦截器,字段取出放到header里
a1.sources.r1.interceptors = i1
a1.sources.r1.interceptors.i1.type = regex_extractora1.sources.r1.interceptors.i1.regex = "自定义字段":"(\\w+)"
a1.sources.r1.interceptors.i1.serializers = s1
a1.sources.r1.interceptors.i1.serializers.s1.name = topic
topic不要自定义,1.7 源码固定是 "topic",...如果自定义的话..淡淡的忧伤.....
...........
#设置Kafka的Topic
a1.sinks.k1.topic=%{topic}
............
更多推荐
已为社区贡献1条内容
所有评论(0)