Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个Flink使用FlinkKafkaConsumer.
Flink
FlinkKafkaConsumer
我有兴趣Kafka使用record/offset. KeyedDeserializationSchema似乎主题、分区、偏移量和消息都可用。
Kafka
record/offset
KeyedDeserializationSchema
如何获取时间戳?
您可以简单地使用ConsumerRecord.timestamp()- 自纪元开始以来的时间戳(以毫秒为单位)(1970 年 1 月 1 日午夜(UTC))。时间戳类型在 timestampType() 中指明。
ConsumerRecord.timestamp()