[
https://issues.apache.org/jira/browse/FLINK-27738?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17541242#comment-17541242
]
Shengkai Fang commented on FLINK-27738:
---------------------------------------
Do you mean you want to use the KafkaSink to modify the config of the Kafka
topic? If so, I think it's not a good idea. The connector API just
INSERT/MODIFY/DELTE the content in the topic, which will not influence the
topic itself. In the Flink world, Catalog is used to manage the metadata
including alter the topic config.
If you want to set the KafkaProducer properties, I think the setProperties[1]
is enough for you?
[1]
https://github.com/apache/flink/blob/b4bb9c8bffe1e37ad6912348d8b3bef89af42286/flink-connectors/flink-connector-kafka/src/main/java/org/apache/flink/connector/kafka/sink/KafkaSinkBuilder.java#L122
> instance KafkaSink support config topic properties
> --------------------------------------------------
>
> Key: FLINK-27738
> URL: https://issues.apache.org/jira/browse/FLINK-27738
> Project: Flink
> Issue Type: Improvement
> Components: Connectors / Kafka
> Affects Versions: 1.15.0
> Reporter: LCER
> Priority: Major
>
> I useĀ KafkaSink to config Kafka information as following:
> *KafkaSink.<String>builder()*
> *.setBootstrapServers(brokers)*
> *.setRecordSerializer(KafkaRecordSerializationSchema.builder()*
> *.setTopicSelector(topicSelector)*
> *.setValueSerializationSchema(new SimpleStringSchema())*
> *.build()*
> *)*
> *.setDeliverGuarantee(DeliveryGuarantee.EXACTLY_ONCE)*
> *.setKafkaProducerConfig(properties)*
> *.build();*
> *----------------*
> *I can't find any method to support config topic properties*
--
This message was sent by Atlassian Jira
(v8.20.7#820007)