Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-21219

FlinkKafkaConsumer ignores offset overrides for new topics when restoring from savepoint.

    XMLWordPrintableJSON

Details

    Description

      Currently, when FlinkKafkaConsumer is restored from savepoint, the following code will handle topics that do not have offsets committed (for example if a new topic was added):

      if (restoredState != null) { for (KafkaTopicPartition partition : allPartitions) { if (!restoredState.containsKey(partition)) { restoredState.put(partition, KafkaTopicPartitionStateSentinel.EARLIEST_OFFSET); } }

       

      So if we have a KafkaConsumer with topicPattern and the pattern is changed, new topis will always start from earliest offset, even if originally the setting was different.

      Attachments

        Activity

          People

            Unassigned Unassigned
            Wosinsan Dominik Wosiński
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated: