[ 
https://issues.apache.org/jira/browse/FLINK-27174?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17526356#comment-17526356
 ] 

Zhengqi Zhang commented on FLINK-27174:
---------------------------------------

In the current code, if the user does not use the setBootstrapServers method to 
set bootstrapServers, even if he provides it in a separate property, the 
non-null check on bootstrapServers will fail, which is obviously unreasonable. 
In fact, we can just check bootstrapServers in the final property.

> Non-null check for bootstrapServers field is incorrect in KafkaSink
> -------------------------------------------------------------------
>
>                 Key: FLINK-27174
>                 URL: https://issues.apache.org/jira/browse/FLINK-27174
>             Project: Flink
>          Issue Type: Bug
>          Components: Connectors / Kafka
>    Affects Versions: 1.14.4
>            Reporter: Zhengqi Zhang
>            Priority: Major
>              Labels: easyfix
>         Attachments: image-2022-04-11-18-11-18-576.png, 
> image-2022-04-11-18-17-48-514.png
>
>
> If the user-supplied kafkaProducerConfig contains bootstrapServers 
> information, there is no need to define the value of this field separately 
> through the setBootstrapServers method. Obviously, the current code doesn't 
> notice this.
> !image-2022-04-11-18-11-18-576.png|width=859,height=261!
>  
> Perhaps we can check bootstrapServers as follows:
> !image-2022-04-11-18-17-48-514.png|width=861,height=322!
>  
> {color:#172b4d}Or check bootstrapServers like KafkaSourceBuilder.{color}
>  
>  



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to