【发布时间】:2021-03-09 14:57:07
【问题描述】:
有 2 个主题,source_topic.a,source_topic.b。 source_topic.a 与 source_topic.b 有依赖关系(例如,需要先接收 source_topic.b)。为了注意 sink 过程,需要先从 source_topic.b 接收数据,然后再从 source_topic.a 接收数据。有没有办法在源/接收器配置中设置主题/表的顺序?
以下是使用的配置,并且有多个表格和主题。 时间戳用于每次轮询时更新表的模式。并将 timestamp.initial 设置为特定的时间戳。
源配置
name=jdbc-mssql-prod-5
connector.class=io.confluent.connect.jdbc.JdbcSourceConnector
connection.url=jdbc:sqlserver:
connection.user=
connection.password=
topic.prefix= source_topic.
mode=timestamp
table.whitelist=A,B,C
timestamp.column.name=ModifiedDateTime
connection.backoff.ms=60000
connection.attempts=300
validate.non.null= false
# enter timestamp in milliseconds
timestamp.initial= 1604977200000
接收器配置
name=mysql-sink-prod-5
connector.class=io.confluent.connect.jdbc.JdbcSinkConnector
tasks.max=1
topics= sink_topic_a, sink_topic_b
connection.url=jdbc:mysql:
connection.user=
connection.password=
insert.mode=upsert
delete.enabled=true
pk.mode=record_key
errors.log.enable= true
errors.log.include.messages=true
【问题讨论】:
标签: jdbc apache-kafka apache-kafka-connect