-
Feature Request
-
Resolution: Done
-
Major
-
1.9.5.Final
-
None
-
False
-
None
-
False
Which use case/requirement will be addressed by the proposed feature?
We'd like to ease the deletion of Capture Tables on the SQL Server database side by letting it know that we've already consumed all records from a Capture Table and it can be safely deleted. For that we'd like to use io.debezium.pipeline.source.spi.StreamingChangeEventSource#commitOffset(Map<String, ?> offset) which tells the offset that was committed with Kafka Connect. The problem is that there is no information on which partition the offset being committed belongs to.
Implementation ideas (optional)
It makes sense to change the signature of commitOffset to (Map<String, ?> partition, Map<String, ?> offset) so that the implementation of this method knows which partition the offset belongs to. For that to work io.debezium.connector.common.BaseSourceTask needs to track not only the last offset that was consumed, but also the partition that last record was consumed from.