It looks like I had been computing the lag of the Debezium connector incorrectly. The correct way seems to be obtaining the progress of the connector through its JMX metrics and then comparing it with the output of “show binary logs”
The relevant metrics we are now using are https://debezium.io/documentation/reference/2.4/connectors/mysql.html#binlog-filename & https://debezium.io/documentation/reference/2.4/connectors/mysql.html#binlog-position

Previously, I had been comparing the logline
[io.debezium.connector.common.BaseSourceTask - 6446138 records sent during previous 00:21:12.915, last recorded offset of {server=debezium-cdc-events2} partition is {transaction_id=null, ts_sec=1699284313, file=mysql-bin-changelog.004266, pos=55915217, row=8, server_id=73360770, event=6}]
with the latest binlog file that’s available on the mysql server.
That seems to be inaccurate.

Regards,
-VG
--
You received this message because you are subscribed to a topic in the Google Groups "debezium" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/debezium/TyF_QjMScf4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to debezium+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/debezium/085eec1b-18bc-4a9e-9283-03ad8d454cean%40googlegroups.com.
Jiri,
QueueRemainingCapacity is frequently hitting 0.

Debezium connector is gradually falling behind the latest binlog file.

--
Thanks Jiri, I will try that though I feel that it won't fix the
issue as the read speed from CDC is faster than writing to kafka.
How have other folks solved the speed mismatch issue? Which
property of kafka can I tweak? I am not a kafka expert. We have a
3-node MSK cluster in AWS. In our spring-boot app, we are mostly
using the default kafka properties.
-VG