You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Jark Wu (Jira)" <ji...@apache.org> on 2021/11/05 05:35:00 UTC

[jira] [Assigned] (FLINK-24490) The sample code is wrong in Apache Kafka Connector page

     [ https://issues.apache.org/jira/browse/FLINK-24490?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jark Wu reassigned FLINK-24490:
-------------------------------

    Assignee: JasonLee

> 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
>            Assignee: JasonLee
>            Priority: Minor
>             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()                                                                                                
>        .setBootstrapServers(brokers)                   
>        .setRecordSerializer(KafkaRecordSerializationSchema.builder() 
>              .setTopic("topic-name")
>              .setValueSerializationSchema(new SimpleStringSchema()) 
>              .build() 
>         )
>         .setDeliverGuarantee(DeliveryGuarantee.AT_LEAST_ONCE)
>         .build();
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)