简体   繁体   English

从Kafka流到Elasticsearch时的主题映射

[英]Topic mapping when streaming from Kafka to Elasticsearch

When I transfer or stream two and three tables then I can easily map in Elasticsearch but can I map automatically map topics to index 当我传输或流传输两个和三个表时,我可以轻松地在Elasticsearch中进行映射,但可以将主题自动映射到索引

I have streamed data from PostgreSQL to ES by mapping manually topic.index.map=topic1:index1,topic2:index2 , etc. 我已经通过手动映射topic.index.map=topic1:index1,topic2:index2等将数据从PostgreSQL流式传输到ES。

Can I map automatically whatever topics send by producer then consumer consume in ES connector automatically? 我可以自动映射生产者发送的任何主题,然后消费者自动在ES连接器中消费吗?

By default, the topics map directly to an index of the same name. 默认情况下,主题直接映射到同名索引。

If you want "better" control, you can use RegexRouter in a transforms property 如果需要“更好”的控件,则可以在transforms属性中使用RegexRouter

To quote the docs 引用文档

topic.index.map

This option is now deprecated. 现在不推荐使用此选项。 A future version may remove it completely. 将来的版本可能会完全删除它。 Please use single message transforms, such as RegexRouter , to map topic names to index names 请使用单个消息转换(例如RegexRouter )将主题名称映射到索引名称

If you cannot capture a single regex for each topic in the connector, then run more connectors with a different pattern 如果无法为连接器中的每个主题捕获单个正则表达式,请运行具有不同模式的更多连接器

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 无法将数据从 kafka 主题发送到 elasticsearch - Unable to send data from kafka topic to elasticsearch kafka 连接器 elasticsearch 不消耗主题 - kafka connector elasticsearch not consuming topic 尝试使用Kafka Connect在Elasticsearch中为Kafka主题编制索引 - Trying to index kafka topic in Elasticsearch with Kafka Connect 使用logstash消费kafka主题到elasticSearch - Consuming a kafka topic using logstash to elasticSearch Logstash Kafka主题作为Elasticsearch索引名的一部分 - Logstash kafka topic as part of elasticsearch indexname kafka-connect-elasticsearch:当使用“write.method”作为 upsert 时,是否可以在 kafka 主题上使用相同的 AVRO object 来发送部分文档? - kafka-connect-elasticsearch: When using “write.method” as upsert, is it possible to use same AVRO object on kafka topic to send partial document? Kafka Connect使用(json)消息中的字段将主题持久化到Elasticsearch索引 - Kafka Connect to persist topic to Elasticsearch index using field from (json) message Kafka 连接器到 map 主题键作为 ElasticSearch 中的文档 ID - Kafka Connector to map topic key as document id in ElasticSearch Kafka-connect elasticsearch用于索引的自动小写主题名称 - Kafka-connect elasticsearch auto-lowercase topic name for for index 如何设置电报配置以收集 Elasticsearch 中的 kafka 主题/分区滞后 - How set telegraf configuration to collect kafka topic/partition lags in Elasticsearch
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM