现在,在我的场景中,Flink每次都会读取Kafka的最新数据。例如,Kafka产品:日志1日志2日志3读取时,只需要log3。kafka消费api,seektoend()可以做到。flinkkafkaconsumer有相同的功能吗?
t9eec4r01#
Flink1.3有这个功能。flinkkafkaconsumer09 flinkkafkaconsumer09=new flinkkafkaconsumer09<>(properties.getproperty(“主题”),new rowdeserializationschema(properties.getproperty(“分隔符”),resulttype),properties);flinkkafkaconsumer09.setstartfromlatest();
1条答案
按热度按时间t9eec4r01#
Flink1.3有这个功能。
flinkkafkaconsumer09 flinkkafkaconsumer09=new flinkkafkaconsumer09<>(properties.getproperty(“主题”),new rowdeserializationschema(properties.getproperty(“分隔符”),resulttype),properties);
flinkkafkaconsumer09.setstartfromlatest();