Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-4785

Records from internal repartitioning topics should always use RecordMetadataTimestampExtractor

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.10.2.0
    • Fix Version/s: 1.0.0
    • Component/s: streams
    • Labels:
      None

      Description

      Users can specify what timestamp extractor should be used to decode the timestamp of input topic records. As long as RecordMetadataTimestamp or WallclockTime is use this is fine.

      However, for custom timestamp extractors it might be invalid to apply this custom extractor to records received from internal repartitioning topics. The reason is that Streams sets the current "stream time" as record metadata timestamp explicitly before writing to intermediate repartitioning topics because this timestamp should be use by downstream subtopologies. A custom timestamp extractor might return something different breaking this assumption.

      Thus, for reading data from intermediate repartitioning topic, the configured timestamp extractor should not be used, but the record's metadata timestamp should be extracted as record timestamp.

      In order to leverage the same behavior for intermediate user topic (ie, used in through()) we can leverage KAFKA-4144 and internally set an extractor for those "intermediate sources" that returns the record's metadata timestamp in order to overwrite the global extractor from StreamsConfig (ie, set FailOnInvalidTimestampExtractor).

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jeyhunkarimov Jeyhun Karimov
                Reporter:
                mjsax Matthias J. Sax
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: