Hi all!
At the company I am working for we have started looking at CDC in MS SQL Server and Debezium for an Outbox style publishing of events to Kafka.
We run highly transactional databases in hosting locations all over the world, and we want to be able to produce near real-time events based on transactions in the db. Right now we are using a home-grown solution based on SQLCLR, but for various reasons we want to go away from that.
That is where Debezium comes into play. The problem we are running into is that we see an almost constant latency of ~2 seconds between an "event" appearing in an underlying CDC change table and it being available in the Kafka topic. This is on a local machine with Kafka and Debezium running in a Docker Container, and SQL Server (2019) installed on the local machine. So, I assume network "stuff" should not come into play.
We are aware that MS SQL CDC has quite a few settings that impacts the performance, but regardless of settings we see this 2 seconds delay. When publishing directly from a kafka client to a topic the event appears within milliseconds.
So my question is what "knobs and levers" can be turned on the Debezium connector to lower the latency. It doesn't seem to matter what the "
poll.interval.ms" is set to in the connector configuration; the latency sits at around 2 seconds. We are running Confluent Kafka 6.2 and the Debezium SQL Server connector 1.7.0.
If anyone has any ideas ...
Thanks!
Niels