diff --git a/src/services/debezium/libs/connectors.js b/src/services/debezium/libs/connectors.js index 65fe90e..232ffd4 100644 --- a/src/services/debezium/libs/connectors.js +++ b/src/services/debezium/libs/connectors.js @@ -25,4 +25,28 @@ export const connectors = [ "poll.interval.ms": 200, }, }, + { + name: "aws.seatool.debezium.changed_date", + config: { + "connector.class": "io.debezium.connector.sqlserver.SqlServerConnector", + "database.hostname": process.env.legacydbIp, + "database.port": process.env.legacydbPort, + "database.user": process.env.legacydbUser, + "database.password": process.env.legacydbPassword, + "database.names": "SEA", + "topic.prefix": `${process.env.topicNamespace}aws.seatool.debezium.changed_date`, + "database.server.name": `${process.env.topicNamespace}aws.seatool.debezium.changed_date`, + "table.include.list": "dbo.State_Plan", + "column.include.list": + "dbo.State_Plan.ID_Number,dbo.State_Plan.Changed_Date", + "skip.messages.without.change": true, + "schema.history.internal.kafka.topic": `${process.env.topicNamespace}aws.seatool.debezium.changed_date.dbHistory`, + "schema.history.internal.kafka.bootstrap.servers": + process.env.bootstrapBrokerStringTls, + "schema.history.internal.producer.security.protocol": "SSL", + "schema.history.internal.consumer.security.protocol": "SSL", + "decimal.handling.mode": "double", + "database.encrypt": false, + }, + }, ]; diff --git a/src/services/debezium/serverless.yml b/src/services/debezium/serverless.yml index 4662007..4ed8f76 100644 --- a/src/services/debezium/serverless.yml +++ b/src/services/debezium/serverless.yml @@ -202,6 +202,9 @@ resources: - name: ${param:topicNamespace}aws.seatool.debezium.cdc.SEA.dbo.Type - name: ${param:topicNamespace}aws.seatool.debezium.cdc.SEA.dbo.State_Plan_Service_Types - name: ${param:topicNamespace}aws.seatool.debezium.cdc.SEA.dbo.State_Plan_Service_SubTypes + - name: ${param:topicNamespace}aws.seatool.debezium.changed_date + - name: ${param:topicNamespace}aws.seatool.debezium.changed_date.dbHistory + - name: ${param:topicNamespace}aws.seatool.debezium.changed_date.SEA.dbo.State_Plan CleanupTopics: Type: AWS::CloudFormation::CustomResource Condition: isDev # We only clean up topics in lower environments where isDev is true @@ -210,6 +213,7 @@ resources: BrokerString: ${self:custom.brokerString} TopicPatternsToDelete: - ${param:topicNamespace}aws.seatool.debezium.cdc* + - ${param:topicNamespace}aws.seatool.debezium.changed_date* - ${param:topicNamespace}mgmt.connect.${self:service}* DependsOn: - LambdaSecurityGroupEgress