Problem
Currently, the Ballerina MSSQL connector lacks native support for CDC (mechanism for tracking and capturing changes in a database table), limiting its usability for real-time data streaming and event-driven applications.
Proposed Solution
Debezium-Based Approach
Integrate with Debezium, a log-based CDC solution, for a more efficient and real-time change tracking mechanism.
Debezium can capture changes by reading SQL Server’s transaction logs, reducing database load compared to polling.
Alternatives
Polling Using JDBC
Implement a scheduled polling mechanism that queries the CDC tables (cdc.<table_name>_CT) at a defined interval.
Use JDBC queries to fetch changes from SQL Server’s built-in CDC tables.
Simple but more costly in terms of work needed.