有个场景需要从kafka topic中读出message,然后转到另一个kakfa集群的topic中,为省事就用了logstash。
配置如下:
input {
kafka {
bootstrap_servers => 'client1:9092,client2:9092'
group_id => 'mygroup'
topics => ["topic-info"]
codec => 'plain'
}
}
output {
#stdout { codec => rubydebug }
kafka {
bootstrap_servers => 'client1:9092,client2:9092'
topic_id => 'topic-out'
codec => plain
}
}
但消息输出:
2017-11-08T12: