Deploy the Debezium Kafka source connector for NBS 7 case notifications

This page walks through enabling Change Data Capture (CDC) and deploying the Debezium source connector used by Case Notification services. Complete Case notifications before starting this page. After you finish the connector deployment, proceed to deploying the Case Notification service.

On this page

  1. Prerequisites
  2. Enable Change Data Capture
  3. Deploy the Debezium connector using Helm
  4. Troubleshooting
  5. Next steps

Prerequisites

This page assumes you’ve completed Before you begin for the microservices phase and Data Processing deployment. If your deployment plan includes NND Service (Data Sync), complete it before this page.

Enable Change Data Capture

In this section, the terms cdc and CDC appear as part of SQL Server column and parameter names and refer to Change Data Capture, not the Centers for Disease Control and Prevention.

Enable Change Data Capture on NBS_ODSE before deploying the connector. Sysadmin permissions are required.

  1. Enable Change Data Capture on NBS_ODSE:

    exec msdb.dbo.rds_cdc_enable_db 'NBS_ODSE';
    
  2. Verify the configuration. A value of is_cdc_enabled=1 indicates successful configuration:

    SELECT name,
    is_cdc_enabled
    FROM sys.databases;
    
  3. Enable Change Data Capture for the required table in NBS_ODSE:

    USE NBS_ODSE;
    exec sys.sp_cdc_enable_table @source_schema = N'dbo', @source_name = N'CN_transportq_out', @role_name = NULL;
    
  4. Verify Change Data Capture is enabled for ODSE tables:

    USE NBS_ODSE;
    SELECT
     name,
     case when is_tracked_by_cdc = 1 then 'YES'
       else 'NO' end as is_tracked_by_cdc
     FROM sys.tables
     WHERE is_tracked_by_cdc = 1;
    

Deploy the Debezium connector using Helm

Complete the following steps to deploy the ‘debezium-case-notifications’ Helm chart from the charts/debezium-case-notifications/ directory of your cloned NEDSS-Helm repository:

  1. In the debezium-case-notifications chart directory, open the values file for your cloud provider:
    • AWS: debezium-case-notifications/values.yaml
    • Azure: debezium-case-notifications/values-azure.yaml
  2. In the values file, search for EXAMPLE and fill in your environment-specific values. The Helm values reference lists the values to use. The connector’s SQL Server config is preconfigured for the NBS_ODSE database and doesn’t need to change.
  3. Install the connector:
    • AWS: helm install debezium-case-notification-service-connect ./debezium-case-notifications -f ./debezium-case-notifications/values.yaml
    • Azure: helm install debezium-case-notification-service-connect ./debezium-case-notifications -f ./debezium-case-notifications/values-azure.yaml
  4. Confirm the pod is running:

    kubectl get pods
    

If the pod is not in a running state, wait and troubleshoot before continuing to deploy the Case Notification service.

Troubleshooting

If the service has trouble connecting to the database, delete the ConfigMap and then reinstall the chart to recreate it:

  1. Delete the ConfigMap:

    kubectl delete configmap case-notification-connect
    
  2. Reinstall the chart:

    • AWS: helm upgrade debezium-case-notification-service-connect ./debezium-case-notifications -f ./debezium-case-notifications/values.yaml
    • Azure: helm upgrade debezium-case-notification-service-connect ./debezium-case-notifications -f ./debezium-case-notifications/values-azure.yaml

Next steps

Continue to Notification service.