Incrementing mode is a JDBC source connector polling mode for tables with a strictly increasing column, usually an ID. The connector stores its latest value and polls for rows above that value, allowing newly inserted records to reach Kafka. section 11.8.3
Detecting a new customer
With mode=incrementing and incrementing.column.name=ID, a connector can process IDs 1 and 2, then publish a row inserted with ID 3. If the last processed ID was 3, its next query is equivalent to SELECT * FROM customers WHERE id > 3. Kafka Connect converts the resulting database row into a JSON message. section 11.8.3
The mode tracks new IDs rather than changes to existing rows. Updating the row with ID 3 therefore produces no message. Deletions are not detected either, because they create no new incrementing value. section 11.8.3
Use incrementing mode when:
- The selected column increases monotonically and strictly; reused or smaller IDs can be skipped. section 11.8.3
- New-row capture is sufficient and updates or deletes do not need to be propagated. section 11.8.3
- Changes to existing rows must be captured through a timestamp column; use timestamp mode or timestamp+incrementing instead. section 11.8.3 section 11.10
