【问题标题】:AWS DMS with AWS MSK(Kafka) CDC transactional changes具有 AWS MSK(Kafka) CDC 事务更改的 AWS DMS
【发布时间】: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


    【解决方案1】:

    文档说,您可以定义分区键来分组数据 “您还为每个表定义了一个分区键,Apache Kafka 使用它来将数据分组到其分区中”

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-09-27
      • 1970-01-01
      • 2021-02-07
      • 2022-06-21
      • 1970-01-01
      • 2021-08-10
      • 2022-07-17
      • 1970-01-01
      相关资源
      最近更新 更多