使用 fluentd 和 elasticsearch 进行实时数据同步

Real time data syncing using fluentd and elasticsearch

我正在使用 fluentd 将数据从 kafka 同步到 elascticsearch。但是 fluentd 需要 60 秒才能将数据同步到 elasticsearch。我想要实时数据同步。是否有任何我必须包含的配置参数。

我试过了

<source>
  @type kafka
  brokers localhost:9092
  topics xxx
</source>
<match xxx>
  @type elasticsearch
  scheme http
  port 9200
  <buffer tag>
    @type memory
    flush_thread_count 4
  </buffer>
</match>

我们使用 flush_interval 参数,像这样:

  <buffer>
    flush_interval        5s
    flush_thread_count    4
  </buffer>