【发布时间】:2020-08-19 15:04:22
【问题描述】:
我打算将 AWS Database Migration Service (DMS) 与 AWS MSK(Kafka) 结合使用。
我想将同一事务中的所有更改发送到 Kafka 主题的同一分区 - 以保证正确的消息顺序(参考完整性)
为此,我将启用以下属性:
IncludeTransactionDetails – Provides detailed transaction information from the source database. This information includes a commit timestamp, a log position, and values for transaction_id, previous_transaction_id, and transaction_record_id (the record offset within a transaction). The default is false. https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.Kafka.html
另外,正如我从同一文档中看到的那样:
AWS DMS supports the following two forms for partition keys:
1. SchemaName.TableName: A combination of the schema and table name.
2. ${AttributeName}: The value of one of the fields in the JSON, or the primary key of the table in the source database.
我有一个问题 - 在“IncludeTransactionDetails = true”的情况下,我能否使用事件 JSON 中的“transaction_id”作为 MSK(Kafka) 迁移主题的分区键?
【问题讨论】:
标签: amazon-web-services cdc aws-dms aws-msk