When no previous offset is present (because it is the first load) or the last offset gathered from the table is out of range (because the last load was longer ago than the topic retention time), the connector always starts from the end of topic (kafka default strategy 'latest'). For low throughput topics there might be no message at that point of time so again, no new offset is stored and the messages are lost. Additionally, for topics that work with compaction it is expected to load everything from beginning the topic.
This commit allows specifying AUTO_OFFSET_RESET as property and the value is passed to the kafka consumer. The default setting is changed to earliest to prevent this behaviour. When one really wants to consume from the topic end, it can be overriden.
When no previous offset is present (because it is the first load) or the last offset gathered from the table is out of range (because the last load was longer ago than the topic retention time), the connector always starts from the end of topic (kafka default strategy 'latest'). For low throughput topics there might be no message at that point of time so again, no new offset is stored and the messages are lost. Additionally, for topics that work with compaction it is expected to load everything from beginning the topic.
This commit allows specifying
AUTO_OFFSET_RESET
as property and the value is passed to the kafka consumer. The default setting is changed toearliest
to prevent this behaviour. When one really wants to consume from the topic end, it can be overriden.