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
- Prerequisites
- Enable Change Data Capture
- Deploy the Debezium connector using Helm
- Troubleshooting
- 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.
- Have your database credentials, domain values, and Kafka endpoint available. See the Helm values reference for help determining any values.
- Confirm that the
case-notification-serviceKeycloak client has been imported. See Import service clients and retrieve secrets if you need help.
Enable Change Data Capture
In this section, the terms
cdcandCDCappear 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.
-
Enable Change Data Capture on
NBS_ODSE:exec msdb.dbo.rds_cdc_enable_db 'NBS_ODSE'; -
Verify the configuration. A value of
is_cdc_enabled=1indicates successful configuration:SELECT name, is_cdc_enabled FROM sys.databases; -
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; -
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:
- In the
debezium-case-notificationschart directory, open the values file for your cloud provider:- AWS:
debezium-case-notifications/values.yaml - Azure:
debezium-case-notifications/values-azure.yaml
- AWS:
- In the values file, search for
EXAMPLEand fill in your environment-specific values. The Helm values reference lists the values to use. The connector’s SQL Server config is preconfigured for theNBS_ODSEdatabase and doesn’t need to change. - 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
- AWS:
-
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:
-
Delete the ConfigMap:
kubectl delete configmap case-notification-connect -
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
- AWS:
Next steps
Continue to Notification service.