融合弹性搜索接收器正则表达式分配给所有主题并发送到索引

时间:2018-05-21 20:46:02

标签: elasticsearch apache-kafka avro apache-kafka-connect confluent

我有这样的多个主题

client1-table1
client1-table2
client1-table3
client1-table4

我希望我的elasticsearch sink能够侦听任何传入的消息,并相应地将它们发送到索引。但是我当前的配置不起作用......我能做什么...下面是我的弹性搜索接收器

{
  "name": "es-data",
  "config": {
    "_comment": "-- standard converter stuff -- this can actually go in the worker config globally --",
    "connector.class": "io.confluent.connect.elasticsearch.ElasticsearchSinkConnector",
    "value.converter": "io.confluent.connect.avro.AvroConverter",
    "key.converter": "io.confluent.connect.avro.AvroConverter",
    "key.converter.schema.registry.url": "http://localhost:8081",
    "value.converter.schema.registry.url": "http://localhost:8081",


    "_comment": "--- Elasticsearch-specific config ---",
    "_comment": "Elasticsearch server address",
    "connection.url": "http://127.0.0.1:9200",


    "_comment": "If the Kafka message doesn't have a key (as is the case with JDBC source)  you need to specify key.ignore=true. If you don't, you'll get an error from the Connect task: 'ConnectException: Key is used as document id and can not be null.",
    "key.ignore": "true"
  }
}

0 个答案:

没有答案