[英]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.