Many thanks for your reply Chris, I'm going to try that change with MongoDB.
Anyway right now, I'm getting a constant ratio of messages/second in the topic for the PostgreSQL table, and the topic for the MongoDB table, 1.5k for PostgreSQL and 2.k for MongoDB.
I can see that there are thousands of changes pending in PostgreSQL and MongoDB (I am using a tool that inserts tuples constantly, thousands of them), however Debezium consumes the logs in chunks, or so it seems. I am seeing in the Debezium logs the following pattern:
[2022-01-17 15:53:49,832] INFO WorkerSourceTask{id=mongodb-cdc-0} flushing 8189 outstanding messages for offset commit (org.apache.kafka.connect.runtime.WorkerSourceTask:510)
[2022-01-17 15:53:59,000] INFO WorkerSourceTask{id=one-table-0} flushing 6145 outstanding messages for offset commit (org.apache.kafka.connect.runtime.WorkerSourceTask:510)
[2022-01-17 15:54:04,198] INFO WorkerSourceTask{id=mongodb-cdc-0} flushing 8193 outstanding messages for offset commit (org.apache.kafka.connect.runtime.WorkerSourceTask:510)
[2022-01-17 15:54:11,106] INFO Checking current members of replica set at mongodb-standalone.node.keedio.cloud (io.debezium.connector.mongodb.ReplicaSetDiscovery:90)
[2022-01-17 15:54:12,794] INFO WorkerSourceTask{id=one-table-0} flushing 6145 outstanding messages for offset commit (org.apache.kafka.connect.runtime.WorkerSourceTask:510)
[2022-01-17 15:54:18,348] INFO WorkerSourceTask{id=mongodb-cdc-0} flushing 8189 outstanding messages for offset commit (org.apache.kafka.connect.runtime.WorkerSourceTask:510)
[2022-01-17 15:54:26,347] INFO WorkerSourceTask{id=one-table-0} flushing 6145 outstanding messages for offset commit (org.apache.kafka.connect.runtime.WorkerSourceTask:510)
id=mongodb-cdc-0 is the MongoDB test table
id=one-table-0 is the PostgreSQL test table
The Connect server (Debezium) is not under CPU/Memory pressure, however the changes from PostgreSQL and MongoDB the changes are picked up with that cadence, slowly, even when I stop the tool that inserts records, Debezium keeps for many minutes picking up changes, with that rate.
Could you explain to me, please, what is the meaning of the message "flushing XXXX outstanding messages for offset commit"?
Many thanks!