Reputation: 325
I am using FlinkKafkaConsumer to consume the data from kafka? but I am not able to get the latest offset from he data received. How to do it in flink?.Could anyone guide me in this?
Upvotes: 1
Views: 635
Reputation: 4542
You have to use a custom deserialziation schema called KeyedDeserializationSchema
to access the offset for each message.
The deserialize()
method has an argument where the framework passes you the offset for each message.
Upvotes: 3