Hi I think there is a good way in FlinkKafkaProducerBase.java to deal with this situation. There is a KeyedSerializationSchema user have to implement. KeyedSerializationSchema will be used to serialize data, so that SinkFunction just need to understand the type after serialization. In your case, I think you can add a SerializationSchema interface in SinkFunction. And user have to implement the SerializationSchema, maybe named Tuple2SerializationSchema.
2017-02-22 7:17 GMT+08:00 Mohit Anchlia <mohitanch...@gmail.com>: > What's the best way to retrieve both the values in Tuple2 inside a custom > sink given that the type is not known inside the sink function? >