JingGe commented on a change in pull request #17288:
URL: https://github.com/apache/flink/pull/17288#discussion_r709254557
##########
File path:
flink-examples/flink-examples-streaming/src/main/java/org/apache/flink/streaming/examples/statemachine/KafkaEventsGeneratorJob.java
##########
@@ -47,7 +49,16 @@ public static void main(String[] args) throws Exception {
final StreamExecutionEnvironment env =
StreamExecutionEnvironment.getExecutionEnvironment();
env.addSource(new EventsGeneratorSource(errorRate, sleep))
- .addSink(new FlinkKafkaProducer<>(brokers, kafkaTopic, new
EventDeSerializer()));
+ .sinkTo(
+ KafkaSink.<Event>builder()
+ .setBootstrapServers(brokers)
+ .setRecordSerializer(
+
KafkaRecordSerializationSchema.builder()
+ .setValueSerializationSchema(
+ new
EventDeSerializer())
Review comment:
All other serialization classes are following the ***Schema naming
convention. Maybe we should consider rename EventDeSerializer to EventSchema in
a separate PR.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]