JasonLee created FLINK-24490: -------------------------------- Summary: The sample code is wrong in Apache Kafka Connector page Key: FLINK-24490 URL: https://issues.apache.org/jira/browse/FLINK-24490 Project: Flink Issue Type: Bug Components: Documentation Affects Versions: 1.14.0 Reporter: JasonLee Fix For: 1.14.0
There is a sample code error in the kafka sink part {code:java} // code placeholder KafkaSink<String> sink = KafkaSink.<String>builder() .setBootstrapServers(brokers) .setRecordSerializer(KafkaRecordSerializationSchema.builder() .setTopic("topic-name") .setValueSerializationSchema(new SimpleStringSchema()) .setDeliveryGuarantee(DeliveryGuarantee.AT_LEAST_ONCE) .build() ) .build(); {code} The correct wording should be as follows {code:java} // code placeholder KafkaSink<String> sink = KafkaSink.<String>builder() .setKafkaProducerConfig(properties) .setBootstrapServers(broker) .setRecordSerializer(KafkaRecordSerializationSchema.builder() .setTopic(topic) .setValueSerializationSchema(new SimpleStringSchema()) .build() ).setDeliverGuarantee(DeliveryGuarantee.EXACTLY_ONCE) .build(); {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)