Reputation: 2973
I have some historical data, each record has their timestamp. I would like to read them and feed them into kafka topic, and use kafka stream to process them in a time windowed manner.
Now the question is, when I create kafka stream time windowed aggregation processor, how can I tell kafka to use timestamp field in the record to create time window, instead of real live time?
Upvotes: 3
Views: 748
Reputation: 32090
You need to create a custom TimestampExtractor
that will extract the value from the record itself - there's an example of this in the documentation, and here too. I also found this gist which looks relevant.
Upvotes: 4