In kafka010, ConsumerRecord has a field named timestamp. It is encapsulated in Kafka010Fetcher. How can I get the timestamp when I write a flink job? Thank you very much.
> In kafka010, ConsumerRecord has a field named timestamp. It is encapsulated in Kafka010Fetcher.
> How can I get the timestamp when I write a flink job?
Kafka010Fetcher puts the timestamps into the StreamRecords that wrap your events. If you want to access these timestamps, you can use a ProcessFunction. The onElement method of a ProcessFunction is passed a Context object with a timestamp method that returns the timestamp of the element currently being processed.
David
On Tue, Dec 31, 2019 at 3:37 PM 刘建刚 <[hidden email]> wrote:
In kafka010, ConsumerRecord has a field named timestamp. It is encapsulated in Kafka010Fetcher. How can I get the timestamp when I write a flink job? Thank you very much.