imperio-wxm commented on issue #8535: [FLINK-11693] Add KafkaSerializationSchema that uses ProducerRecord URL: https://github.com/apache/flink/pull/8535#issuecomment-609003023 Hi, - flink-1.10 I found `FlinkKafkaProducer0xxx` unable to support `KafkaSerializationSchema`, because of `FlinkKafkaProducer0xxx` need `KeyedSerializationSchema` or `SerializationSchema` as a serialization tool, I can't initialize like this. ```java public class ProducerSerializationSchema implements KafkaSerializationSchema<ConsumerRecord<byte[], byte[]>> { @Override public ProducerRecord<byte[], byte[]> serialize(ConsumerRecord<byte[], byte[]> element, @Nullable Long timestamp) { // do my logic return null; } } // flink streaming stream.addSink(new FlinkKafkaProducer011( "default", new ProducerSerializationSchema(), properties, FlinkKafkaProducer011.Semantic.EXACTLY_ONCE )); ```
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
