簡體   English   中英

Kafka 連接(Debezium mysql 連接器)僅監聽 table.include.list 中的特定表

[英]Kafka connect (Debezium mysql connector ) only listening to specific table in table.include.list

我正在使用 debezium 連接器讀取數據庫中的數據寫入,然后將其發送到 kafka 以供 kafka 消費者使用。 我在table.include.list中指定了三個表,但它只監聽第一個表的變化。 這是我在 kafka connect 中使用的配置:

connector.class=io.debezium.connector.mysql.MySqlConnector
database.user=root
topic.creation.default.partitions=3
database.server.id=184092
tasks.max=1
database.history.kafka.bootstrap.servers=kafka:9092
database.history.kafka.topic=history_dev2.test
database.server.name=test_name
database.port=3306
database.hostname=localhost
database.password=root
topic.creation.default.replication.factor=1
table.include.list=test.t1,test.t2,test.t3
database.include.list=test

您必須在table.include.list屬性中添加正則表達式

前任。

table.include.list=^(test.)((t1)|(t2)|(t3))$

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM